question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parser raises an error for null Boolean Type

See original GitHub issue

Following a commit GitHub introduced to their schema yesterday gql can no longer parse its schema, as it fails on this null Boolean type:

{'name': 'isVerified', 'description': 'Filter by if the domain is verified.', 'type': {'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None}, 'defaultValue': 'null'}

GitHub claims this change is in accordance with the GraphQL standards documentation:

By default, every type is nullable - it’s legitimate to return null as any of the scalar types. Use an exclamation point to indicate a type cannot be nullable, so String! is a non-nullable string.

Therefore, it appears that a null default value for a boolean is valid in GraphQL.

Currently the code specifically ignores null values.

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
DeanArbelcommented, Feb 28, 2021

@leszekhanusz You’re right, I will start using the pre-release version of gql, as it seems to solve the issue.

1reaction
leszekhanuszcommented, Feb 25, 2021

Yep, anyway it is graphql-core which is parsing the schema so you should create an issue there

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot set boolean to null - java - Stack Overflow
- boolean is a primitive type, and can have a value of only true or false . - Whereas Boolean is a Wrapper...
Read more >
GDScript: logical and/or between non boolean value cause a ...
if both operands of the and/or operator are compile time known non boolean values, the parser throws error (where it shouldn't).
Read more >
VRL function reference | Vector documentation
Here you'll find a comprehensive list of all built-in VRL functions. Functions are categorized by their purpose and sorted alphabetically for easy discovery ......
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it...
Read more >
GREL functions - OpenRefine
Takes any value type (string, number, date, boolean, error, null) and ... You can also convert dates to strings, using date parsing syntax ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found