Skip to content

Commit

Permalink
📝 added schema.graphql for ease of reading
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy-lmao committed Jan 30, 2020
1 parent 09dadfd commit 66526d3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
**/*.rs.bk
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cargo.toml
[workspace]
members = [
"api",
]
34 changes: 34 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This was obtained from the endpoint, and is not used by graphql server
type Cult {
id: Int!
name: String!
members: [Person!]!
}

type Mutation {
createPerson(data: NewPerson!): Person!
createCult(data: NewCult!): Cult!
}

input NewCult {
name: String!
}

input NewPerson {
name: String!
cult: Int
}

type Person {
id: Int!
name: String!
cult: Cult
}

type Query {
personById(id: Int!): Person!
persons: [Person!]!
cultById(id: Int!): Cult!
cults: [Cult!]!
}

0 comments on commit 66526d3

Please sign in to comment.