IBM / openapi-to-graphql

Translate APIs described by OpenAPI Specifications (OAS) into GraphQL
https://developer.ibm.com/open/projects/openapi-to-graphql/
MIT License
1.61k stars 211 forks source link

Ignore links with side-effects #416

Open thomsonbw opened 3 years ago

thomsonbw commented 3 years ago

In graphql only top-level mutator fields are permitted to have side effects. Openapi specs though can validly have links to POST and PUT and DELETE operations, and current link processing generates nested fields for them. It should ignore links to non-GET ops.

Zn4rK commented 2 years ago

I'm seeing this as well. It doesn't look like it would be too hard to check wether it's a POST, PUT or DELETE, and then ignore it in the Query.

It also seems like this creates recursive links if it happens to link to the same schema. That's generally useful if you want to link to the resource after it's been created...