Skip to content

Commit

Permalink
Added more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Mar 28, 2024
1 parent d04fb9e commit 0953e66
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type Query {
users: [User!]!
}

type User @key(fields: "id") {
id: ID
friends(type: FriendType = FAMILY): [User!]!
}

enum FriendType {
FAMILY @internal
FRIEND
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type Query {
users: [User!]!
}

type User @key(fields: "id") {
id: ID
friends(type: FriendType = FAMILY @internal): [User!]!
}

enum FriendType {
FAMILY @internal
FRIEND
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type Query {
reviews: [Review]
}

type Review @key(fields: "id") {
id: ID!
title: String!
author: User!
}

extend type User @key(fields: "id") {
id: ID! @external
profile: Profile! @external
reviews: [Review] @requires(fields: "profile { id __typename }")
}

extend type Profile {
id: ID! @external
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extend schema @link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key"])

type Query {
users: [User]
}

type User @key(fields: "id") {
id: ID!
profile: Profile!
}

type Profile {
id: ID!
name: String!
}

0 comments on commit 0953e66

Please sign in to comment.