Schema: Query
flesch opened this issue · 0 comments
flesch commented
#1 defined the root of our schema — this issue describes the root Query
and it's available fields.
# The root query is the entry point for fetching data.
type Query {
# Useful in testing, a query for "echo" will respond with what is passed
# as the `message` argument. Supply an `uppercase` argument with a boolean
# value to demonstrate that we can modify how the message looks.
echo(message:String = "Hello, world!", uppercase:Boolean = false): String
# The "viewer" is the currently authenticated `User`.
viewer: User
# A user, identified by an ID, is an individual's account.
# This query returns a single user.
user(id:ID): User
}
Remember, graphql-frankenstein only extracts graphql
fenced code blocks like above. The following is a JavaScript snippet that won't break our schema.
const frankenstein = require('graphql-frankenstein');