8000 `TypeError` from passing invalid arguments when there's more than one query present · Issue #61 · slicknode/graphql-query-complexity · GitHub
[go: up one dir, main page]

Skip to content
TypeError from passing invalid arguments when there's more than one query present #61
Closed
@dburles

Description

@dburles

A query such as:

query {
  requiredArgs(count: x) {
    scalar
    complexScalar
  }
  nonNullItem {
    scalar
    complexScalar
    variableScalar(count: 10)
  }
}

results in complexityMap, being undefined, and the error TypeError: Cannot convert undefined or null to object arising from this call.

Here's a reproduction https://github.com/dburles/graphql-query-complexity/blob/bug/src/__tests__/QueryComplexity-test.ts#L800-L821. Running this test will result in the error being thrown.

GraphQL should be reporting "Argument \"count\" has invalid value x.".

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

      0