yarax / swagger-to-graphql

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

Are $ref's key to this project? #97

Closed tbrannam closed 5 years ago

tbrannam commented 5 years ago

@yarax While investigating https://github.com/APIDevTools/swagger-parser - I came across the option to dereference instead of bundle. Dereference will actually dereference the $ref within the swagger paths which seems like it removes some complexity. I started looking at using this as an opportunity to simply a few edge cases that I'm seeing with my Swagger yaml.

I have concerns that I'm missing something fundamental to this project.

tbrannam commented 5 years ago

I think I found the weakness of this approach - if you have a nested object inside a param - you will loose the names which would be mapped to GraphQL types.

yarax commented 5 years ago

@tbrannam exactly, besides that we still have issues with dereferencing, e.g https://github.com/yarax/swagger-to-graphql/issues/86