Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Fix GraphiQL warning on the pcre argument #157

Merged
merged 1 commit into from
May 26, 2018

Conversation

Totktonada
Copy link
Member

The problem was in incorrect schema: sub-arguments of the pcre argument
for non-null strings was generated as non-null that triggers a warning
in GraphiQL in case when the sub-argument is omitted. Graphql-lua
(graphql/core/validate.lua) does not check for this kind of
inconsistency between a schema and a query, so lack of the sub-argument
works as expected in test/common/pcre.test.lua.

The added test with immediate sub-arguments of the pcre argument does
not catch the bug, but I decided to leave it in the commit.

Fixes #156.

The problem was in incorrect schema: sub-arguments of the pcre argument
for non-null strings was generated as non-null that triggers a warning
in GraphiQL in case when the sub-argument is omitted. Graphql-lua
(graphql/core/validate.lua) does not check for this kind of
inconsistency between a schema and a query, so lack of the sub-argument
works as expected in test/common/pcre.test.lua.

The added test with immediate sub-arguments of the pcre argument does
not catch the bug, but I decided to leave it in the commit.

Fixes #156.
@Totktonada Totktonada added the bug Something isn't working label May 26, 2018
@Totktonada Totktonada self-assigned this May 26, 2018
@Totktonada Totktonada requested a review from SudoBobo May 26, 2018 08:33
@Totktonada Totktonada merged commit c0687f3 into master May 26, 2018
@Totktonada Totktonada deleted the gh-156-fix-pcre-argument branch May 26, 2018 08:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant