Skip to content

Instantly share code, notes, and snippets.

@alvinslee
Created August 5, 2021 16:47
Show Gist options
  • Save alvinslee/f6506caa5a241593c71131fdb46c0c58 to your computer and use it in GitHub Desktop.
Save alvinslee/f6506caa5a241593c71131fdb46c0c58 to your computer and use it in GitHub Desktop.
Insomnia+GraphQL - schema.graphql
type User {
id: Int!
name: String!
email: String!
addresses: [Address]
}
type Address {
street: String!
city: String!
country: String!
}
type Query {
getUser(id: Int!): User
}
type Mutation {
addUser(user: UserInput!): User
}
input UserInput {
name: String!
email: String!
addresses: [AddressInput!]
}
input AddressInput {
street: String!
city: String!
country: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment