-
-
Notifications
You must be signed in to change notification settings - Fork 749
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
1ce4881
commit 85fbd2d
Showing
2 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
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
148 changes: 148 additions & 0 deletions
148
...apshots__/TagTests.Exclude_Type_System_Members_With_Internal_Tag_Which_Is_Private.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,148 @@ | ||
schema | ||
@fusion(version: 1) | ||
@transport(subgraph: "Accounts", location: "http:\/\/localhost:5000\/graphql", kind: "HTTP") | ||
@transport(subgraph: "Accounts", location: "ws:\/\/localhost:5000\/graphql", kind: "WebSocket") | ||
@transport(subgraph: "Reviews", location: "http:\/\/localhost:5000\/graphql", kind: "HTTP") | ||
@transport(subgraph: "Reviews", location: "ws:\/\/localhost:5000\/graphql", kind: "WebSocket") { | ||
query: Query | ||
mutation: Mutation | ||
subscription: Subscription | ||
} | ||
|
||
type Query { | ||
productById(id: ID!): Product | ||
@variable(subgraph: "Reviews", name: "id", argument: "id") | ||
@resolver(subgraph: "Reviews", select: "{ productById(id: $id) }", arguments: [ { name: "id", type: "ID!" } ]) | ||
reviewById(id: ID!): Review | ||
@variable(subgraph: "Reviews", name: "id", argument: "id") | ||
@resolver(subgraph: "Reviews", select: "{ reviewById(id: $id) }", arguments: [ { name: "id", type: "ID!" } ]) | ||
reviewOrAuthor: ReviewOrAuthor! | ||
@resolver(subgraph: "Reviews", select: "{ reviewOrAuthor }") | ||
reviews: [Review!]! | ||
@resolver(subgraph: "Reviews", select: "{ reviews }") | ||
someTypeById(id: ID!): SomeType! | ||
@variable(subgraph: "Accounts", name: "id", argument: "id") | ||
@resolver(subgraph: "Accounts", select: "{ someTypeById(id: $id) }", arguments: [ { name: "id", type: "ID!" } ]) | ||
userById(id: ID!): User | ||
@variable(subgraph: "Accounts", name: "id", argument: "id") | ||
@resolver(subgraph: "Accounts", select: "{ userById(id: $id) }", arguments: [ { name: "id", type: "ID!" } ]) | ||
@variable(subgraph: "Reviews", name: "id", argument: "id") | ||
@resolver(subgraph: "Reviews", select: "{ authorById(id: $id) }", arguments: [ { name: "id", type: "ID!" } ]) | ||
users: [User!]! | ||
@resolver(subgraph: "Accounts", select: "{ users }") | ||
usersById(ids: [ID!]!): [User!]! | ||
@variable(subgraph: "Accounts", name: "ids", argument: "ids") | ||
@resolver(subgraph: "Accounts", select: "{ usersById(ids: $ids) }", arguments: [ { name: "ids", type: "[ID!]!" } ]) | ||
viewer: Viewer! | ||
@resolver(subgraph: "Accounts", select: "{ viewer }") | ||
} | ||
|
||
type Mutation { | ||
addReview(input: AddReviewInput!): AddReviewPayload! | ||
@variable(subgraph: "Reviews", name: "input", argument: "input") | ||
@resolver(subgraph: "Reviews", select: "{ addReview(input: $input) }", arguments: [ { name: "input", type: "AddReviewInput!" } ]) | ||
addUser(input: AddUserInput!): AddUserPayload! | ||
@variable(subgraph: "Accounts", name: "input", argument: "input") | ||
@resolver(subgraph: "Accounts", select: "{ addUser(input: $input) }", arguments: [ { name: "input", type: "AddUserInput!" } ]) | ||
} | ||
|
||
type Subscription { | ||
onNewReview: Review! | ||
@resolver(subgraph: "Reviews", select: "{ onNewReview }", kind: "SUBSCRIBE") | ||
} | ||
|
||
type AddReviewPayload { | ||
review: Review | ||
@source(subgraph: "Reviews") | ||
} | ||
|
||
type AddUserPayload { | ||
user: User | ||
@source(subgraph: "Accounts") | ||
} | ||
|
||
type Product | ||
@variable(subgraph: "Reviews", name: "Product_id", select: "id") | ||
@resolver(subgraph: "Reviews", select: "{ productById(id: $Product_id) }", arguments: [ { name: "Product_id", type: "ID!" } ]) { | ||
id: ID! | ||
@source(subgraph: "Reviews") | ||
reviews: [Review!]! | ||
@source(subgraph: "Reviews") | ||
} | ||
|
||
type Review implements Node | ||
@variable(subgraph: "Reviews", name: "Review_id", select: "id") | ||
@resolver(subgraph: "Reviews", select: "{ reviewById(id: $Review_id) }", arguments: [ { name: "Review_id", type: "ID!" } ]) | ||
@resolver(subgraph: "Reviews", select: "{ nodes(ids: $Review_id) { ... on Review { ... Review } } }", arguments: [ { name: "Review_id", type: "[ID!]!" } ], kind: "BATCH") { | ||
author: User! | ||
@source(subgraph: "Reviews") | ||
body: String! | ||
@source(subgraph: "Reviews") | ||
id: ID! | ||
@source(subgraph: "Reviews") | ||
product: Product! | ||
@source(subgraph: "Reviews") | ||
} | ||
|
||
type SomeData { | ||
accountValue: String! | ||
@source(subgraph: "Accounts") | ||
} | ||
|
||
type SomeType | ||
@variable(subgraph: "Accounts", name: "SomeType_id", select: "id") | ||
@resolver(subgraph: "Accounts", select: "{ someTypeById(id: $SomeType_id) }", arguments: [ { name: "SomeType_id", type: "ID!" } ]) { | ||
id: ID! | ||
@source(subgraph: "Accounts") | ||
} | ||
|
||
type User implements Node | ||
@source(subgraph: "Reviews", name: "Author") | ||
@variable(subgraph: "Accounts", name: "User_id", select: "id") | ||
@variable(subgraph: "Reviews", name: "User_id", select: "id") | ||
@resolver(subgraph: "Accounts", select: "{ userById(id: $User_id) }", arguments: [ { name: "User_id", type: "ID!" } ]) | ||
@resolver(subgraph: "Accounts", select: "{ usersById(ids: $User_id) }", arguments: [ { name: "User_id", type: "[ID!]!" } ], kind: "BATCH") | ||
@resolver(subgraph: "Reviews", select: "{ authorById(id: $User_id) }", arguments: [ { name: "User_id", type: "ID!" } ]) | ||
@resolver(subgraph: "Reviews", select: "{ nodes(ids: $User_id) { ... on User { ... User } } }", arguments: [ { name: "User_id", type: "[ID!]!" } ], kind: "BATCH") { | ||
birthdate: Date! | ||
@source(subgraph: "Accounts") | ||
id: ID! | ||
@source(subgraph: "Accounts") | ||
@source(subgraph: "Reviews") | ||
name: String! | ||
@source(subgraph: "Accounts") | ||
@source(subgraph: "Reviews") | ||
reviews: [Review!]! | ||
@source(subgraph: "Reviews") | ||
username: String! | ||
@source(subgraph: "Accounts") | ||
} | ||
|
||
type Viewer { | ||
data: SomeData! | ||
@source(subgraph: "Accounts") | ||
user: User | ||
@source(subgraph: "Accounts") | ||
} | ||
|
||
"The node interface is implemented by entities that have a global unique identifier." | ||
interface Node { | ||
id: ID! | ||
} | ||
|
||
union ReviewOrAuthor = User | Review | ||
|
||
input AddReviewInput { | ||
authorId: Int! | ||
body: String! | ||
upc: Int! | ||
} | ||
|
||
input AddUserInput { | ||
birthdate: Date! | ||
name: String! | ||
username: String! | ||
} | ||
|
||
"The `Date` scalar represents an ISO-8601 compliant date type." | ||
scalar Date |