Skip to content

improving the AST doc #183

@theobat

Description

@theobat

I think a good way to improve the doc would be to provide examples at each level of the AST types with graphql doc snippets such as what I naively did in #145.
Something like:

#VariableDefinition -> a variable defined in a GraphQL query/mutation context like
myQuery($myVariable: MyVariableType)
# Field -> a Field takes place in a SelectionSet such as 
myParentField { myField1 myField2 } 
#Argument -> an argument is defined in front of a GraphQL Field such as 
{ myField (myArgument: "literalString")}  or { myField (myArgument: $myVariable)}

I'm going to try to put together a PR for this.

I think it would be easier for new comers to grasp what is going on in the query parsing (which is half of the job), and helps a lot when it comes to contributing

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