Skip to content

Add option to wrap response in data object #664

@herrernst

Description

@herrernst

Is your feature request related to a problem? Please describe.
We'd like to have an OpenAPI spec for exactly what a GraphQL server would return. GraphQL wraps the response in a topmost data property (in the same level, there can also be an error key/property): https://graphql.org/learn/response/

Describe the solution you'd like
Add an CLI option like --wrap-in-data-object or --wrapper-object-property "data".

Describe alternatives you've considered
Removing the data wrapper in the server response, but then it would be different from the GraphQL response. And in GraphQL, there could be both an error object and an data object (which could be partial, with the accompanying error).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions