Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
barryashcroft opened this issue Aug 21, 2023 · 0 comments
Open

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

barryashcroft opened this issue Aug 21, 2023 · 0 comments

Comments

@barryashcroft
Copy link

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
            }
          }
        }
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant