Skip to content

Commit

Permalink
more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Apr 4, 2024
1 parent eec186e commit bb3fe22
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rfcs/test-cases/external-requires-extension/fusion/reviews.graphql
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 rfcs/test-cases/external-requires-extension/fusion/users.graphql
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!
}
14 changes: 14 additions & 0 deletions rfcs/test-cases/interface-object-another/fusion/a.graphql
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
}
9 changes: 9 additions & 0 deletions rfcs/test-cases/interface-object-another/fusion/b.graphql
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
}

0 comments on commit bb3fe22

Please sign in to comment.