Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Options for shape of Batch GraphQL Return JSON #47

Open
ammanley opened this issue Jun 15, 2018 · 0 comments
Open

Configuration Options for shape of Batch GraphQL Return JSON #47

ammanley opened this issue Jun 15, 2018 · 0 comments

Comments

@ammanley
Copy link

Awesome project you got going here, thanks for keeping this going. I've been using the batch option to allow for batch-GraphQL requests from ApolloClient, but it doesn't seem like there is an easy way to specify what shape I want the data to return in? Correct me if I'm wrong.

For example, currently when sending batch-requests, I get back a JSON array with the data I am interested in nested under a "data" key which is itself nested in a "payload" key.

[
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    },
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    },
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    }
]

I'm hoping I can just get these objects sent back without the data nested in the payload key. Any suggestions? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant