yarax / swagger-to-graphql

Swagger to GraphQL API adapter
MIT License
924 stars 150 forks source link

Swagger operations should not return nulls #108

Closed kamilchm closed 5 years ago

kamilchm commented 5 years ago

According to https://swagger.io/docs/specification/describing-responses/ null is not valid as response body

0xR commented 5 years ago

Looks good, although this might be a breaking change. I'll think about how to release this, for now I'll merge it.

kamilchm commented 5 years ago

If you use swagger-to-graphql to wrap REST calls, it shouldn't break anything because swagger endpoints can't return nulls. Before this change the null handling was moved up to the GraphQL client, when for real the nulls will be handled behind the REST API. The client null checks will be compatible and you can remove them in the future. Do you have any other potentially breaking change in mind?