Skip to content

Instantly share code, notes, and snippets.

@Wizyma
Last active May 25, 2018 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wizyma/a4f5fa5ab82e8936e483233452f8984f to your computer and use it in GitHub Desktop.
Save Wizyma/a4f5fa5ab82e8936e483233452f8984f to your computer and use it in GitHub Desktop.
GraphQL medium
// Schema definition
type Query {
user(username: String!): User!
}
type User {
username: String!
firstname: String!
lastname: String!
age: Int!
country: String
}
// Client query
{
user(username: "paco"){
firstname
age
}
}
// Server Response
{
"user": {
"firstname": "Gintama",
"age": 26
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment