Skip to content

graphql-js error encountered in the /learn pages #1307

Closed
@jfcisco

Description

@jfcisco

Description

Instead of showing the result of the GraphQL query in the web page, the output box shows an error.

Steps to Reproduce

  1. Open a browser and navigate to either of the following:

Expected Result

The field name returns a String type, in this case the name of the main hero of Star Wars, "R2-D2".

Actual Result

data property is null and an error is shown in the output box. For example, the /learn/queries/#fields section shows this error:

{
  "errors": [
    {
      "message": "Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "hero"
      ]
    }
  ],
  "data": {
    "hero": null
  }
}

Additional Context

I was able to reproduce the issue on Chrome 107.0.5304.107 and Firefox Developer Edition 107.0b9 (64-bit)

image

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