ethercreative / simplemap

A beautifully simple map field type for Craft CMS.
Other
136 stars 47 forks source link

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

Open a-am opened 3 years ago

a-am commented 3 years ago

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

  1. 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
        }
      }
    }
    }
    }
  2. 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

andris-sevcenko commented 3 years ago

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

WithAlex commented 3 years ago

Hi ! Do you have a fix ?

mufi-siebird commented 1 year ago

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