Title: query error undefined constant
Last modified: June 11, 2024

---

# query error undefined constant

 *  Resolved [semiherdogan](https://wordpress.org/support/users/semiherdogan/)
 * (@semiherdogan)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/query-error-undefined-constant/)
 * Hi,
 * When I use the IDE to check the query, I receive `undefined constant` error. 
   Does anyone face with such a case. I updated the php version in april to 8.1.
   Does anyone use this plugin with this php version, might it be related to the
   php version?
 *     ```wp-block-code
       {  "errors": [    {      "debugMessage": "Undefined constant \"path\"",      "message": "Internal server error",      "extensions": {        "category": "internal"      },      "locations": [        {          "line": 13,          "column": 11        }      ],      "path": [        "blogs",        "nodes",        0,        "featuredImage",        "node",        "sourceUrl"      ]    },    {      "debugMessage": "Undefined constant \"path\"",      "message": "Internal server error",      "extensions": {        "category": "internal"      },      "locations": [        {          "line": 13,          "column": 11        }      ],      "path": [        "blogs",        "nodes",        1,        "featuredImage",        "node",        "sourceUrl"      ]    },    {      "debugMessage": "Undefined constant \"path\"",      "message": "Internal server error",      "extensions": {        "category": "internal"      },      "locations": [        {          "line": 13,          "column": 11        }      ],      "path": [        "blogs",        "nodes",        2,        "featuredImage",        "node",        "sourceUrl"      ]    }  ],  "data": {...
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jason Bahl](https://wordpress.org/support/users/jasonbahl/)
 * (@jasonbahl)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/query-error-undefined-constant/#post-17817298)
 * [@semiherdogan](https://wordpress.org/support/users/semiherdogan/) I regularly
   use WPGraphQL with several versions of PHP and our tests also run on several 
   versions of PHP including PHP 8.1
   I would recommend following the debugging guide
   to help you get more information: [https://www.wpgraphql.com/docs/debugging](https://www.wpgraphql.com/docs/debugging)
 * What is the query you are trying to execute? Based on the error message it looks
   like you are trying to query something like the following:
 *     ```wp-block-code
       {  blogs {    nodes {      featuredImage {        node {          sourceUrl               }      }    }  }}
       ```
   
 * Out of the box, this is not a valid query because there is no field “blogs” in
   the Schema. If you’re expecting to be able to query this, then something (a plugin
   or custom code) has extended the Schema and that code _might_ be causing issues.
   
   If you’re not able to pinpoint the issue following the Debug guide linked above,
   I would recommend de-activating any plugins or custom code and then activating
   things one at a time until you are able to identify the source of the bug.

Viewing 1 replies (of 1 total)

The topic ‘query error undefined constant’ is closed to new replies.

 * ![](https://ps.w.org/wp-graphql/assets/icon-256x256.png?rev=3111985)
 * [WPGraphQL](https://wordpress.org/plugins/wp-graphql/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-graphql/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-graphql/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-graphql/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-graphql/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-graphql/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jason Bahl](https://wordpress.org/support/users/jasonbahl/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/query-error-undefined-constant/#post-17817298)
 * Status: resolved