Skip to content

Missing closing brace in GQL input does not emit error #1897

@lilyball

Description

@lilyball

Intended outcome:

I took one of my input GQL files and deleted a closing brace, then re-ran apollo client:codegen. I expected it to produce an error.

Actual outcome:

It succeeded just as if I had no error, except it skipped outputting a .graphql.swift file corresponding to the input file I modified.

How to reproduce the issue:

  1. Take an existing project with multiple graphql input files
  2. Edit one of the files and delete a closing brace somewhere. I did it at the end of a query, but I also tried deleting an interior brace and got the same behavior.
  3. Run apollo client:codegen $outputDir --includes="*.graphql" --localSchemaFile=schema.json --target=swift

Versions

I've reproduced with both apollo/2.21.0 darwin-x64 node-v10.19.0 and a freshly-installed apollo/2.27.0 darwin-x64 node-v10.19.0.

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