Skip to content

Commit 15253e4

Browse files
committed
fix(example): updated schema
1 parent ab356ee commit 15253e4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

example/schema/schema.graphql

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type Author {
33
"The internal identifier of the author."
44
id: ID! # the ! means that every author object _must_ have an id
55
"The first name of the author. It might not be the legal name. It's just a name mate...."
6-
firstName: String
6+
firstName: String @deprecated(reason: "this is bad")
77
"The last name of the author. It might be everything as we do not run Know Your Author."
88
lastName: String
99
"""
@@ -13,7 +13,7 @@ type Author {
1313
}
1414

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

3436
# this schema allows the following mutation:
@@ -44,3 +46,12 @@ schema {
4446
query: Query
4547
mutation: Mutation
4648
}
49+
50+
"A result"
51+
union Result = Author | Post
52+
53+
"A superset of everything"
54+
interface Stuff {
55+
"The identifier of anything"
56+
id: ID!
57+
}

0 commit comments

Comments
 (0)