Skip to content

Name/TypeName/StringValue AST Node? #38

Description

@xuorig

Would you ever consider having a TypeName/StringValue AST node? This would help some tooling be more precise when it comes to the location of a certain node.

Currently working on a linter and noticed I can only reference the position of a type definition and it would be quite useful to get the location of a TypeName/StringValue node 👇

error: my_type should be PascalCase

type my_type {
     ^^^^^^^
  a: String!
}

Happy to contribute something if you see value in it. Looks like the Text trait / NameMatch token could potentially have a Pos?

Example from GraphQL-JS (https://github.com/graphql/graphql-js/blob/master/src/language/ast.js#L238-L242)

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