-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GraphQL interfaces with @hasInverse (#4605)
- Loading branch information
1 parent
52960be
commit 3b96ce7
Showing
7 changed files
with
832 additions
and
26 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
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
20 changes: 20 additions & 0 deletions
20
graphql/schema/testdata/schemagen/input/hasInverse-with-interface-having-directive.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,20 @@ | ||
type Author { | ||
id: ID! | ||
name: String! @search(by: [hash]) | ||
posts: [Post] | ||
} | ||
|
||
interface Post { | ||
id: ID! | ||
text: String @search(by: [fulltext]) | ||
datePublished: DateTime @search | ||
author: Author! @hasInverse(field: posts) | ||
} | ||
|
||
type Question implements Post { | ||
answered: Boolean | ||
} | ||
|
||
type Answer implements Post { | ||
markedUseful: Boolean | ||
} |
20 changes: 20 additions & 0 deletions
20
graphql/schema/testdata/schemagen/input/hasInverse-with-type-having-directive.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,20 @@ | ||
type Author { | ||
id: ID! | ||
name: String! @search(by: [hash]) | ||
posts: [Post] @hasInverse(field: author) | ||
} | ||
|
||
interface Post { | ||
id: ID! | ||
text: String @search(by: [fulltext]) | ||
datePublished: DateTime @search | ||
author: Author! | ||
} | ||
|
||
type Question implements Post { | ||
answered: Boolean | ||
} | ||
|
||
type Answer implements Post { | ||
markedUseful: Boolean | ||
} |
Oops, something went wrong.