-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eec186e
commit bb3fe22
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
rfcs/test-cases/external-requires-extension/fusion/reviews.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
type Query { | ||
reviews: [Review] | ||
reviewById(id: ID!): Review | ||
userById(id: ID!): User | ||
} | ||
|
||
type Review { | ||
id: ID! | ||
title: String! | ||
author: User! | ||
} | ||
|
||
type User { | ||
id: ID! @external | ||
profile: Profile! @external | ||
reviews: [Review] @requires(fields: "profile { id __typename }") | ||
} | ||
|
||
type Profile { | ||
id: ID! @external | ||
} |
14 changes: 14 additions & 0 deletions
14
rfcs/test-cases/external-requires-extension/fusion/users.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type Query { | ||
users: [User] | ||
userById(id: ID!): User | ||
} | ||
|
||
type User { | ||
id: ID! | ||
profile: Profile! | ||
} | ||
|
||
type Profile { | ||
id: ID! | ||
name: String! | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type Query { | ||
hello: String | ||
myInterfaceById(id: ID!): MyInterface | ||
} | ||
|
||
interface MyInterface { | ||
id: ID! | ||
field: String | ||
} | ||
|
||
type IimplementMyInterface implements MyInterface { | ||
id: ID! | ||
field: String | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type Query { | ||
otherField: String | ||
someTypeById(id: ID!): SomeType | ||
} | ||
|
||
type SomeType @baseType(of: "MyInterface") { | ||
id: ID! | ||
hello: Int | ||
} |