BUG: nullable schema
See original GitHub issueHi! I think this project is useful and so interesting.
I have a question. Why do generator use interface for schema definition?
I think type alias is more useful.
e.g.
schema:
type: object
nullable: true
properties:
foo:
type: integer
type schema = { foo: number } | null;
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Bug when a schema has a nullable AllOf ref · Issue #20 - GitHub
Hey! I have a weird issue that happens with refs that are nullable. I have the following schema: "GroupWithRecentMessage": { "type": ...
Read more >Using nullability in GraphQL
GraphQL improves on that by having a complete schema of your available data, and giving you back exactly the fields you asked for....
Read more >Property X in class Y is nullable on one side and not on the other
This error likely means that the property in question has been made Required either in the client code or in the Sync cloud...
Read more >Nulls in GraphQL: Cheatsheet - Hasura
Nullability in GraphQL is a controversial topic. Some say constant null checks are a nuisance, while others err on the side of paranoia....
Read more >Solved: The schema validation failed : Bug?
This error does NOT occur every time my flow rund.. it is sporatic. In my understanding a String can be null and still...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I published v0.19.2. Thanks your bug report !
And, I could align everything to type alias, but that would be a disruptive change to existing users and I need to provide options to minimize that. However, I do not have the time to provide that option, so I will only release a patch to allow nullable.
@ssssota
It does not matter whether it is a Type Alias or an interface. I believe the essence of the issue is whether the problem is solved or not.
By the way, do you mean that there is a problem with specifying
nullable
in the case that @ssssota wrote about? Could you please provide some more details?