Skip to content

Spec and graphql-js disagree on the meaning of a leading zero in numbers #572

Closed
@CornedBee

Description

@CornedBee

A test case from graphql-js:

    expectSyntaxError('00', 'Invalid number, unexpected digit after 0: "0".', {
      line: 1,
      column: 2,
    });

But a literal reading of the grammar for IntValue simply says that 00 is two IntValue tokens, each with a value of 0.

This is obviously not useful; first there's no place in the grammar where two IntValue tokens may appear next to each other, and second, it would be really confusing.

But the spec should probably change its grammar to explicitly call this out.

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