Skip to content

Using gql for query editing #272

Closed
Closed
@abitrolly

Description

@abitrolly

Can qgl be used to programmatically modify queries?

For example to transform this request.

    query getContinents {
      continents {
        code
        name
      }
    }

To this one.

    query getContinents {
      continents (code:"AF") {
        code
        name
      }
    }

gql.gql() parses the input into graphql AST DocumentNode, but it is not clear which methods are available to modify it, and how to write the query back as a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions