Skip to content

feat(GraphQL): Dgraph.Authorization should with irrespective of number of spaces after ##7410

Merged
minhaj-shakeel merged 7 commits intomasterfrom
minhaj/authorization-header
Feb 12, 2021
Merged

feat(GraphQL): Dgraph.Authorization should with irrespective of number of spaces after ##7410
minhaj-shakeel merged 7 commits intomasterfrom
minhaj/authorization-header

Conversation

@minhaj-shakeel
Copy link
Copy Markdown
Contributor

@minhaj-shakeel minhaj-shakeel commented Feb 9, 2021

Fixes GRAPHQ-960.
This PR ignores the spacing between # and Dgraph.Authorization in the GraphQL schema. Now the user can give any number of spaces or no space between it. For example, the header #Dgraph.Authorization..... will also be valid which was earlier not the case.


This change is Reviewable

@github-actions github-actions Bot added the area/graphql Issues related to GraphQL support on Dgraph. label Feb 9, 2021
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.

Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain, @minhaj-shakeel, and @vvbalaji-dgraph)


graphql/schema/schemagen.go, line 188 at r1 (raw file):

				continue
			}
			if !strings.HasPrefix(header, "Dgraph.Secret") {

Can we ensure that similar stuff also works for Dgraph.Secret?

@minhaj-shakeel minhaj-shakeel merged commit 6383300 into master Feb 12, 2021
@minhaj-shakeel minhaj-shakeel deleted the minhaj/authorization-header branch February 12, 2021 13:17
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