Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GraphQL parsing issue with [[String!]]! #5142

Closed
mathix420 opened this issue May 20, 2024 · 2 comments · Fixed by #5148
Closed

GraphQL parsing issue with [[String!]]! #5142

mathix420 opened this issue May 20, 2024 · 2 comments · Fixed by #5148
Labels
bug Something isn't working confirmed Confirmed bug

Comments

@mathix420
Copy link
Contributor

Describe the bug
Failed to parse this valid graphql type [[String!]]!

Type definitions

Query {
  test(fields: [[String!]]!): String!
}

To Reproduce
Steps to reproduce the behavior:

  1. Run a server with the given typedef

Expected behavior
Server should start

Screenshots

11 |  * Produces a GraphQLError representing a syntax error, containing useful
12 |  * descriptive information about the syntax error's position in the source.
13 |  */
14 | function syntaxError(source, position, description) {
15 |   return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, {
16 |     source,
        ^
GraphQLError: TypeError[Query.getPayFormFields]: TypeError[Query.getPayFormFields.fields]: Syntax Error: Unexpected character: "<".
 path: "undefined"
      at syntaxError (/home/mathix/projects/peach_api/node_modules/graphql/error/syntaxError.js:16:4)
      at readNextToken (/home/mathix/projects/peach_api/node_modules/graphql/language/lexer.js:430:9)
      at lookahead (/home/mathix/projects/peach_api/node_modules/graphql/language/lexer.js:392:16)
      at advance (/home/mathix/projects/peach_api/node_modules/graphql/language/lexer.js:336:12)
      at advanceLexer (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:1538:13)
      at expectToken (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:1393:13)
      at parseName (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:255:3)
      at parseNamedType (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:1455:3)
      at parseTypeReference (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:1416:12)
      at parseTypeReference (/home/mathix/projects/peach_api/node_modules/graphql/language/parser.js:1394:14)

If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: [e.g. macOS, Windows] linux
  • Version: [e.g. @neo4j/graphql@1.0.0] "@neo4j/graphql": "5.3.6",
  • Node.js version: [e.g. 14.16.0] v18.18.2

Additional context

Ran using bun run myserver.ts.

@mathix420 mathix420 added the bug Something isn't working label May 20, 2024
@neo4j-team-graphql
Copy link
Collaborator

Many thanks for raising this bug report @mathix420. 🐛 We will now attempt to reproduce the bug based on the steps you have provided.

Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:

  • Type definitions
  • Resolvers
  • Query and/or Mutation (or multiple) needed to reproduce

If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.

Thanks again! 🙏

@neo4j-team-graphql neo4j-team-graphql added the confirmed Confirmed bug label May 21, 2024
@neo4j-team-graphql
Copy link
Collaborator

We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @mathix420! 🙏 We will now prioritise the bug and address it appropriately.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working confirmed Confirmed bug
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

2 participants