Skip to content

Instantly share code, notes, and snippets.

@alfari16
Last active September 7, 2020 07:18
Show Gist options
  • Select an option

  • Save alfari16/e90aedfc3fdb98f74e1932e202be710d to your computer and use it in GitHub Desktop.

Select an option

Save alfari16/e90aedfc3fdb98f74e1932e202be710d to your computer and use it in GitHub Desktop.
#typeDefs.graphql
type Query{
allMerchants: [Merchant!]!
}
type Merchant {
id: ID!
name: String!
products(pagination: PaginationInput!): [Product!]!
location: Location!
}
type Product{
id: ID!
name: String!
}
type Location {
id: ID!
latitude: Float!
longitude: Float!
}
enum SortByEnum {
ASC,
DESC
}
input PaginationInput {
limit: Int = 10
offset: Int = 0
orderBy: String = "name"
sortBy: SortByEnum = "ASC"
search: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment