Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(GraphQL): This PR allow multiple @id fields in a type. #7235

Merged
merged 48 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9bf9279
test changes
JatinDev543 Dec 23, 2020
932a42c
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Dec 29, 2020
a1857ae
allow multiple ids inquery
JatinDev543 Dec 29, 2020
bb8e575
modified query rewriting
JatinDev543 Dec 31, 2020
bd168f8
clean code
JatinDev543 Dec 31, 2020
6565b0e
added tests
JatinDev543 Jan 4, 2021
5296787
fixed formatting
JatinDev543 Jan 4, 2021
3864368
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Jan 4, 2021
314b155
fixed formatting
JatinDev543 Jan 4, 2021
0f3a107
added schema files
JatinDev543 Jan 4, 2021
b06436f
added mutation test
JatinDev543 Jan 6, 2021
d63b2bb
undo changes to mutation rewriter file
JatinDev543 Jan 14, 2021
37cb158
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Feb 11, 2021
1a3b1e8
added mutation support for multiple id's and test
JatinDev543 Feb 11, 2021
8dabb6c
removed print statement
JatinDev543 Feb 11, 2021
24a88a9
addressed comments
JatinDev543 Feb 12, 2021
bad15f1
fix some tests
JatinDev543 Feb 12, 2021
64c6fd1
format code
JatinDev543 Feb 12, 2021
001f3c8
format directive test
JatinDev543 Feb 12, 2021
e747cb9
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Feb 12, 2021
9521936
format schemastring test
JatinDev543 Feb 12, 2021
f0d36e4
fix deepsource errors
JatinDev543 Feb 12, 2021
705e490
fix deepsource errors
JatinDev543 Feb 12, 2021
48b42ba
fixed formatting
JatinDev543 Feb 12, 2021
ed2a7f3
fixed formatting
JatinDev543 Feb 12, 2021
0282b9f
fixed spacing
JatinDev543 Feb 12, 2021
ebac810
fixed spacing
JatinDev543 Feb 12, 2021
c7466ed
fixed spacing
JatinDev543 Feb 12, 2021
a68d9c6
addressed rajas comments, added fix and tests
JatinDev543 Feb 18, 2021
eca8cb1
fix test
JatinDev543 Feb 18, 2021
34b6411
change test name
JatinDev543 Feb 18, 2021
6ed72bf
fixed directives tests
JatinDev543 Feb 18, 2021
7d81413
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Feb 18, 2021
93e1665
fixed test
JatinDev543 Feb 18, 2021
ab5b3b0
fixed normal tests
JatinDev543 Feb 18, 2021
719da93
fixed error when xid is missing from deep level set in update, added …
JatinDev543 Feb 18, 2021
7cc12e3
Fix referencing of node using different IDs
vmrajas Feb 19, 2021
734c90a
added comments and tests
JatinDev543 Feb 19, 2021
1399296
clean code
JatinDev543 Feb 19, 2021
72a0515
Fix incosistent behaviour in case of multiple XIDs
vmrajas Feb 19, 2021
75fa87b
Merge master
vmrajas Feb 19, 2021
1500a09
addressed rajas comments , added upsert mutation and other tests
JatinDev543 Feb 19, 2021
082da07
fixed auth test
JatinDev543 Feb 19, 2021
e83ee30
Merge branch 'master' of github.com:dgraph-io/dgraph into jatin/GRAPH…
JatinDev543 Feb 19, 2021
6dade87
fix schema test
JatinDev543 Feb 19, 2021
9949a52
added a case for upsert mutation with multiple id's
JatinDev543 Feb 22, 2021
86362c7
removed test and fixed testing
JatinDev543 Feb 22, 2021
06401c6
fixed formatting
JatinDev543 Feb 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ee/acl/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func TestCreateAndDeleteUsers(t *testing.T) {
resp := createUser(t, token, userid, userpassword)
require.Equal(t, 1, len(resp.Errors))
require.Equal(t, "couldn't rewrite mutation addUser because failed to rewrite mutation payload because id"+
" alice already exists for type User", resp.Errors[0].Message)
" alice already exists for field name inside type User", resp.Errors[0].Message)
checkUserCount(t, resp.Data, 0)

// delete the user
Expand Down
2 changes: 1 addition & 1 deletion graphql/e2e/auth/add_mutation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ func TestUpsertMutationsWithRBAC(t *testing.T) {
require.Error(t, gqlResponse.Errors)
require.Equal(t, len(gqlResponse.Errors), 1)
require.Contains(t, gqlResponse.Errors[0].Error(),
"GraphQL debug: id already exists for type Tweets")
"GraphQL debug: id tweet1 already exists for field id inside type Tweets")
} else {
common.RequireNoGQLErrors(t, gqlResponse)
require.JSONEq(t, tcase.result, string(gqlResponse.Data))
Expand Down
2 changes: 1 addition & 1 deletion graphql/e2e/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func TestAddMutationWithXid(t *testing.T) {
require.Error(t, gqlResponse.Errors)
require.Equal(t, len(gqlResponse.Errors), 1)
require.Contains(t, gqlResponse.Errors[0].Error(),
"GraphQL debug: id already exists for type Tweets")
"GraphQL debug: id tweet1 already exists for field id inside type Tweets")

// Clear the tweet.
tweet.DeleteByID(t, user, metaInfo)
Expand Down
1 change: 1 addition & 0 deletions graphql/e2e/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ func RunAll(t *testing.T) {
t.Run("cyclically linked mutation", cyclicMutation)
t.Run("parallel mutations", parallelMutations)
t.Run("input coercion to list", inputCoerciontoList)
t.Run("multiple external Id's tests", multipleXidsTests)
t.Run("Upsert Mutation Tests", upsertMutationTests)

// error tests
Expand Down
Loading