Skip to content

fix(GraphQL): Maintain backward compatibility for Dgraph.Authorization in schema.#5998

Merged
arijitAD merged 3 commits intomasterfrom
arijitAD/auth_backward
Jul 16, 2020
Merged

fix(GraphQL): Maintain backward compatibility for Dgraph.Authorization in schema.#5998
arijitAD merged 3 commits intomasterfrom
arijitAD/auth_backward

Conversation

@arijitAD
Copy link
Copy Markdown

@arijitAD arijitAD commented Jul 15, 2020

Fixes #GRAPHQL-574
Currently, we error out if the user specifies the old format for Dgraph.Authorization
This PR allows us to parse the old format as well.


This change is Reviewable

@arijitAD arijitAD requested a review from pawanrawal July 15, 2020 11:13
@github-actions github-actions Bot added the area/graphql Issues related to GraphQL support on Dgraph. label Jul 15, 2020
Copy link
Copy Markdown
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just verify that if you had a GraphQL schema stored inside Dgraph before we updated the format and then we upgraded to the version after this change, it would be fine. Basically the scenario that Slash would encounter.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @arijitAD and @MichaelJCompton)


graphql/authorization/auth.go, line 100 at r1 (raw file):

		"Please check the updated syntax at https://graphql.dgraph.io/authorization/")
	// Note: This is the old format for passing authorization information and this code
	// is there to maintain backward compatibility. It may be remove in future release.

removed

Copy link
Copy Markdown
Author

@arijitAD arijitAD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the above scenario. Schema loading on restart fails without this PR but works with this PR.

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @MichaelJCompton and @pawanrawal)


graphql/authorization/auth.go, line 100 at r1 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

removed

Done.

@arijitAD arijitAD merged commit 93a0813 into master Jul 16, 2020
arijitAD pushed a commit that referenced this pull request Jul 16, 2020
…on` in schema. (#5998)

* Maintain backward compatibility for `Dgraph.Authorization` in schema

(cherry picked from commit 93a0813)
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
…on` in schema. (dgraph-io#5998)

* Maintain backward compatibility for `Dgraph.Authorization` in schema
@joshua-goldstein joshua-goldstein deleted the arijitAD/auth_backward branch August 11, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/graphql Issues related to GraphQL support on Dgraph.

Development

Successfully merging this pull request may close these issues.

2 participants