Last active
February 6, 2019 16:45
-
-
Save avishwakarma/b261f291c61fd914463b400b255c168b to your computer and use it in GitHub Desktop.
DgraphKoa Generated Types, Inputs, Queries and Mutations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Types | |
type Person { | |
id: ID! | |
name: String | |
children( | |
first: Int | |
after: Int | |
filter: PersonFilter | |
): [Person!]! | |
parents( | |
first: Int | |
after: Int | |
filter: PersonFilter | |
): [Person!]! | |
createdAt: DateTime! | |
updatedAt: DateTime! | |
} | |
type PersonMutationPayload { | |
person: Person | |
} | |
// Inputs | |
input PersonFilter { | |
AND: [PersonFilter!] | |
OR: [PersonFilter!] | |
name_eq: String | |
} | |
input CreatePersonMutationInput { | |
name: String | |
children: [PersonInput] | |
parents: [PersonInput] | |
} | |
input UpdatePersonMutationInput { | |
id: ID | |
name: String | |
children: [PersonInput] | |
parents: [PersonInput] | |
} | |
input DeletePersonMutationInput { | |
id: ID! | |
} | |
input AddPersonChildrenMutationInput { | |
id: ID! | |
children: [PersonInput!]! | |
} | |
input RemovePersonChildrenMutationInput { | |
id: ID! | |
children: [PersonInput!]! | |
} | |
input AddPersonParentsMutationInput { | |
id: ID! | |
parents: [PersonInput!]! | |
} | |
input RemovePersonParentsMutationInput { | |
id: ID! | |
parents: [PersonInput!]! | |
} | |
// Query | |
type Query { | |
person(id: ID!): Person | |
people( | |
first: Int | |
after: Int | |
filter: PersonFilter | |
): [Person!]! | |
} | |
// Mutations | |
type Mutation { | |
createPerson(input: CreatePersonMutationInput!): PersonMutationPayload | |
updatePerson(input: UpdatePersonMutationInput!): PersonMutationPayload | |
deletePerson(input: DeletePersonMutationInput!): PersonMutationPayload | |
addPersonChildren(input: AddPersonChildrenMutationInput!): PersonMutationPayload | |
removePersonChildren(input: RemovePersonChildrenMutationInput!): PersonMutationPayload | |
addPersonParents(input: AddPersonParentsMutationInput!): PersonMutationPayload | |
removePersonParents(input: RemovePersonParentsMutationInput!): PersonMutationPayload | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment