fix(GraphQL): Maintain backward compatibility for Dgraph.Authorization in schema.#5998
fix(GraphQL): Maintain backward compatibility for Dgraph.Authorization in schema.#5998
Dgraph.Authorization in schema.#5998Conversation
pawanrawal
left a comment
There was a problem hiding this comment.
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
arijitAD
left a comment
There was a problem hiding this comment.
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.
…on` in schema. (dgraph-io#5998) * Maintain backward compatibility for `Dgraph.Authorization` in schema
Fixes #GRAPHQL-574
Currently, we error out if the user specifies the old format for
Dgraph.AuthorizationThis PR allows us to parse the old format as well.
This change is