diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53eaa21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..efb5c19 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,5 @@ +# Cargo.toml +[workspace] +members = [ + "api", +] diff --git a/schema.graphql b/schema.graphql new file mode 100644 index 0000000..0d7b5a6 --- /dev/null +++ b/schema.graphql @@ -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!]! +} +