GraphQL query stops working - seems cache issue

Created on 27 September 2024, about 2 months ago

Problem/Motivation

GraphQL query suddenly stops working. After clearing all cache multiple time it starts working. It's happening in our prod environment.

Steps to reproduce

When I navigate to run query here `/admin/config/graphql/servers/manage/graphql_compose_server/explorer`. I'm seeing so many errors:
{
"errors": [
{
"message": "Interface field Connection.nodes expects type [EdgeNode!]! but BlockContentAlertConnection.nodes is type [BlockContentAlert!]!.",
"stack": "GraphQLError: Interface field Connection.nodes expects type [EdgeNode!]! but BlockContentAlertConnection.nodes is type [BlockContentAlert!]!.\n at t.reportError (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at w (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at E (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at h (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at Object.Xa [as useMemo] (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at t.useMemo (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at SchemaContextProvider (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at ka (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)"
},
{
"message": "Interface field Edge.node expects type EdgeNode! but BlockContentAlertEdge.node is type BlockContentAlert!.",
"stack": "GraphQLError: Interface field Edge.node expects type EdgeNode! but BlockContentAlertEdge.node is type BlockContentAlert!.\n at t.reportError (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at w (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at E (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at h (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at Object.Xa [as useMemo] (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at t.useMemo (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at SchemaContextProvider (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at ka (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)"
},
{
"message": "Interface field Connection.nodes expects type [EdgeNode!]! but BlockContentAuthorSBlockConnection.nodes is type [BlockContentAuthorSBlock!]!.",
"stack": "GraphQLError: Interface field Connection.nodes expects type [EdgeNode!]! but BlockContentAuthorSBlockConnection.nodes is type [BlockContentAuthorSBlock!]!.\n at t.reportError (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at w (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at E (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at h (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at Object.Xa [as useMemo] (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at t.useMemo (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at SchemaContextProvider (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at ka (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)"
},
{
"message": "Interface field Edge.node expects type EdgeNode! but BlockContentAuthorSBlockEdge.node is type BlockContentAuthorSBlock!.",
"stack": "GraphQLError: Interface field Edge.node expects type EdgeNode! but BlockContentAuthorSBlockEdge.node is type BlockContentAuthorSBlock!.\n at t.reportError (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at w (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at E (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at h (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...\n at Object.Xa [as useMemo] (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at t.useMemo (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at SchemaContextProvider (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)\n at ka (https://wwwassets.tuftshealthplan.com/modules/contrib/graphql/assets/exp...)"
},
}

Proposed resolution

When I clear Drupal cache multiple times, not sure it suddenly starts working. Issue is bit strange but not sure why it's happening.

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

🐛 Bug report
Status

Needs work

Version

4.8

Component

Code

Created by

🇮🇳India pradeepjha

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024