GraphQL Scalar Types
From Logic Wiki
- ID - Used to store unique identifier
- String
- Booelan
- Int
- Float
type Query {
title: String!
price: Float!
releaseYear: Int
rating: Float
inStock: Boolean!
}
const resolvers = {
Query: {
title() {
return 'The War of Art'
},
price() {
return 12.99
},
releaseYear() {
return null
},
rating() {
return 5
},
inStock() {
return true
}
}
}