simplemap icon indicating copy to clipboard operation
simplemap copied to clipboard

GraphQL exception Tried to load an unregistered type "Ether_MapQuery".

Open a-am opened this issue 5 years ago • 3 comments

Description

When using GQL and searching with a query variable I keep getting this error: craft\errors\GqlException: Tried to load an unregistered type "Ether_MapQuery". This can indicate both a typo in the query or an issue with the schema used. This works locally however the only difference between local and production server is the php version. Locally using 7.4.12.

If I used the type "QueryArgument" instead I get this error:

Uncaught (in promise) Error: GraphQL error: Variable "$location" of type "[QueryArgument]" used in position expecting type "Ether_MapQuery".

Steps to reproduce

query ($location: Ether_MapQuery) {
  entries(section: "locations", limit: null, locationAddress: $location, orderBy: "distance") {
    title
    ... on locations_location_Entry {
      locationAddress {
        lat
        lng
        distance
        zoom
        address
        parts {
          number
          address
          city
          postcode
          county
          state
          country
        }
      }
    }
  }
}
  1. Variables
{
  "location": {
    "location": "35007",
    "country": "US",
    "radius": 20
  }
}

I have cleared composer cache and reloaded plugin with no success. Craft's GQL Explorer autocompletes the scheme type so it knows about it however every time it is run from the explorer or the frontend of my application I get the same error.

Additional info

  • Craft version: Craft CMS 3.5.16
  • Maps version: 3.9.0.2
  • PHP version: 7.2.31
  • Database driver & version: MySQL 5.7.32

a-am avatar Dec 03 '20 18:12 a-am

Related: https://github.com/craftcms/cms/issues/7551

andris-sevcenko avatar Feb 22 '21 13:02 andris-sevcenko

Hi ! Do you have a fix ?

WithAlex avatar May 10 '21 17:05 WithAlex

@davidwebca This is still an issue in Craft v3. Any Idea when we will get a solution on that?

mufi-siebird avatar Jan 07 '23 05:01 mufi-siebird