Skip to content

Cannot redeclare type ID #224

Open
Open
@nickwesselman

Description

@nickwesselman

Describe the bug
Our schema at Shopify includes a redeclaration of the ID type, with an updated description documentation on its expected format for our endpoints. This is valid schema, but attempting to generate using it results in the following error:

go run github.com/Khan/genqlient
prelude.graphql:16: invalid schema: Cannot redeclare type ID.
exit status 1

To Reproduce
Create and use a schema with a custom ID type, e.g.

"""
Represents a unique identifier that is Base64 obfuscated. It is often used to
refetch an object or as key for a cache. The ID type appears in a JSON response
as a String; however, it is not intended to be human-readable. When expected as
an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
input value will be accepted as an ID.
"""
scalar ID

Expected behavior
The duplicated scalar is not treated as an error.

genqlient version
v0.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions