-
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): Dgraph directive with reverse edge should work smoothly…
… with interfaces (#5911) Fixes #5744 There was another bug where field which map to reverse edges in Dgraph where generated as part of AddTypeInput and TypeRef. They have been excluded now as we can't perform a mutation along them. They would earlier have given an error at runtime while doing mutations in Dgraph about predicate being incorrect because it starts with ~. Apart, from that to fix #5744, we also allow interfaces implemented by the current type in the che
- Loading branch information
1 parent
144685a
commit ecec071
Showing
9 changed files
with
447 additions
and
13 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
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
15 changes: 15 additions & 0 deletions
15
graphql/schema/testdata/schemagen/input/interface-with-dgraph-pred.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,15 @@ | ||
type Object { | ||
id: ID! | ||
name: String | ||
ownedBy: Person @dgraph(pred: "Object.owner") | ||
} | ||
|
||
type BusinessMan implements Person { | ||
companyName: String | ||
} | ||
|
||
interface Person { | ||
id: ID! | ||
name: String | ||
owns: [Object] @dgraph(pred: "~Object.owner") | ||
} |
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
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
Oops, something went wrong.