Skip to content

Commit

Permalink
fix(example): updated schema
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaticMuch committed Jun 7, 2023
1 parent ab356ee commit 15253e4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions example/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type Author {
"The internal identifier of the author."
id: ID! # the ! means that every author object _must_ have an id
"The first name of the author. It might not be the legal name. It's just a name mate...."
firstName: String
firstName: String @deprecated(reason: "this is bad")
"The last name of the author. It might be everything as we do not run Know Your Author."
lastName: String
"""
Expand All @@ -13,7 +13,7 @@ type Author {
}

"A blog post or something else like carbonara recipe."
type Post {
type Post implements Stuff {
"The internal identifier we love to leak outside."
id: ID!
"The title of the post. There's no limit to the title, so possible the whole post content can be in the title."
Expand All @@ -29,6 +29,8 @@ type Post {
type Query {
"Fetch all posts without any arguments. Default order is funky."
posts: [Post]
"Search everything"
search: [Result]
}

# this schema allows the following mutation:
Expand All @@ -44,3 +46,12 @@ schema {
query: Query
mutation: Mutation
}

"A result"
union Result = Author | Post

"A superset of everything"
interface Stuff {
"The identifier of anything"
id: ID!
}

0 comments on commit 15253e4

Please sign in to comment.