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

Fix(GraphQL): Change variable name generation from Type<Num> to Type_<Num> #7556

Merged
merged 2 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
990 changes: 563 additions & 427 deletions graphql/resolve/add_mutation_test.yaml

Large diffs are not rendered by default.

364 changes: 182 additions & 182 deletions graphql/resolve/auth_add_test.yaml

Large diffs are not rendered by default.

210 changes: 105 additions & 105 deletions graphql/resolve/auth_delete_test.yaml

Large diffs are not rendered by default.

544 changes: 272 additions & 272 deletions graphql/resolve/auth_query_test.yaml

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions graphql/resolve/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,20 @@ func mutationQueryRewriting(t *testing.T, sch string, authMeta *testutil.AuthMet
}
}`,
rewriter: NewAddRewriter,
assigned: map[string]string{"Ticket2": "0x4"},
idExistence: map[string]string{"Column1": "0x1"},
assigned: map[string]string{"Ticket_2": "0x4"},
idExistence: map[string]string{"Column_1": "0x1"},
dgQuery: `query {
AddTicketPayload.ticket(func: uid(TicketRoot)) {
Ticket.id : uid
Ticket.title : Ticket.title
Ticket.onColumn : Ticket.onColumn @filter(uid(Column1)) {
Ticket.onColumn : Ticket.onColumn @filter(uid(Column_1)) {
Column.colID : uid
Column.name : Column.name
}
}
TicketRoot as var(func: uid(Ticket4)) @filter(uid(TicketAuth5))
Ticket4 as var(func: uid(0x4))
TicketAuth5 as var(func: uid(Ticket4)) @cascade {
TicketRoot as var(func: uid(Ticket_4)) @filter(uid(Ticket_Auth5))
Ticket_4 as var(func: uid(0x4))
Ticket_Auth5 as var(func: uid(Ticket_4)) @cascade {
Ticket.onColumn : Ticket.onColumn {
Column.inProject : Column.inProject {
Project.roles : Project.roles @filter(eq(Role.permission, "VIEW")) {
Expand All @@ -453,10 +453,10 @@ func mutationQueryRewriting(t *testing.T, sch string, authMeta *testutil.AuthMet
}
}
var(func: uid(TicketRoot)) {
Column2 as Ticket.onColumn
Column_2 as Ticket.onColumn
}
Column1 as var(func: uid(Column2)) @filter(uid(ColumnAuth3))
ColumnAuth3 as var(func: uid(Column2)) @cascade {
Column_1 as var(func: uid(Column_2)) @filter(uid(Column_Auth3))
Column_Auth3 as var(func: uid(Column_2)) @cascade {
Column.inProject : Column.inProject {
Project.roles : Project.roles @filter(eq(Role.permission, "VIEW")) {
Role.assignedTo : Role.assignedTo @filter(eq(User.username, "user1"))
Expand Down Expand Up @@ -486,14 +486,14 @@ func mutationQueryRewriting(t *testing.T, sch string, authMeta *testutil.AuthMet
UpdateTicketPayload.ticket(func: uid(TicketRoot)) {
Ticket.id : uid
Ticket.title : Ticket.title
Ticket.onColumn : Ticket.onColumn @filter(uid(Column1)) {
Ticket.onColumn : Ticket.onColumn @filter(uid(Column_1)) {
Column.colID : uid
Column.name : Column.name
}
}
TicketRoot as var(func: uid(Ticket4)) @filter(uid(TicketAuth5))
Ticket4 as var(func: uid(0x4))
TicketAuth5 as var(func: uid(Ticket4)) @cascade {
TicketRoot as var(func: uid(Ticket_4)) @filter(uid(Ticket_Auth5))
Ticket_4 as var(func: uid(0x4))
Ticket_Auth5 as var(func: uid(Ticket_4)) @cascade {
Ticket.onColumn : Ticket.onColumn {
Column.inProject : Column.inProject {
Project.roles : Project.roles @filter(eq(Role.permission, "VIEW")) {
Expand All @@ -503,10 +503,10 @@ func mutationQueryRewriting(t *testing.T, sch string, authMeta *testutil.AuthMet
}
}
var(func: uid(TicketRoot)) {
Column2 as Ticket.onColumn
Column_2 as Ticket.onColumn
}
Column1 as var(func: uid(Column2)) @filter(uid(ColumnAuth3))
ColumnAuth3 as var(func: uid(Column2)) @cascade {
Column_1 as var(func: uid(Column_2)) @filter(uid(Column_Auth3))
Column_Auth3 as var(func: uid(Column_2)) @cascade {
Column.inProject : Column.inProject {
Project.roles : Project.roles @filter(eq(Role.permission, "VIEW")) {
Role.assignedTo : Role.assignedTo @filter(eq(User.username, "user1"))
Expand Down
Loading