Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Passing query as JSON (for variables, etc.) seems broken #24

Description

@uebayasi

I'm very new to this GraphQL world but my understanding of GraphQL is that, in order to pass variables or operation_name in addition to query, the body of POST has to be encoded in JSON. A GraphQL query HTML body, with a pair of query and variables, would look like:

{ "query": "...", "variables": "..." }

This does not seem to work with graphene-gae. I put many logging.warn()'s in _get_grapl_params() but could not understand the intent. If the said assumption that GraphQL query body is either raw GraphQL or JSON, this _get_grapl_params() would look like:

    def _get_grapl_params(self):
        try:
            (read body as JSON)
        except:
            (read body as raw GraphQL)

(I even have no idea why this handler has to be implemented in graphene-gae, not graphene.)

I'm trying to fix this myself, but I'm slow; new to Python, new to GraphQL, new to Web world. Feel free to beat me. ;)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions