Skip to content

Error: Cannot query field "nodeByPath" on type "Query". #2

@barryashcroft

Description

@barryashcroft

Graphql starter generates the following error: Error: Cannot query field "nodeByPath" on type "Query".

[...slug].tsx is running a query using nodeByPath. This no longer exists in v2 of drupal module graphql_compose. We should now make queries against routes, see https://drupal-graphql-compose.github.io/documentation/#/features/routes.

Example:

query ($path: String!){
      route(path: $path) {
        ... on RouteInternal {
          entity {
            __typename
            ... on NodeArticle {
              title
            }
          }
        }
      }
    }

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