Skip to content

Backticks in input GraphQL schema file break resolver output #65

Open
@danielfinke

Description

@danielfinke

If you use backticks in an input GraphQL schema file, such as in the following field and type descriptions,

# Comment test with "double quotes" and 'single quotes'

"Members of `Group`s"
type User {
  firstName: String
  lastName: String
  "Computed based on `firstName` and `lastName`"
  fullName: String
}

"Description test with 'single quotes'"
type Group {
  name: String
}

the output of schemaDataModelJSON in the resolver output will be badly formed and the module will break.

Backticks in comments are fine because they are already stripped from the schema. The example above includes other JS string delimiters to account for in the fix.

Command: node ./neptune-for-graphql.js --input-schema-file test.graphql --output-no-lambda-zip

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