Incorrect object received from graphql preview api


I’m currently trying to debug an issue where I can query the graphql preview api with an incorrect slug and receive data.

I have two items of the same type with very similar data but different slugs (and obviously different ids). I’m running a query for them against and only seem to get one item in response, regardless of the slug I use.

For example, when I run this query I receive a response with the item with the slug introduction-to-REDACTED-march-24 (which, in the graphql explorer correctly returns null, because this slug doesn’t exist for any item). (The actual slug doesn’t have REDACTED). This is the last updated item, so makes sense that it’s on top of the pile.

query: "\n  query webinarQuery($slug: SlugFilter) {\n      webinar(filter: {slug: $slug}) {\n      id\n      shortDescription\n      description {\n        value\n      }\n      startTime\n      endTime\n      schedule {\n        lengthInMinutes\n        scheduleItem\n      }\n      slug\n      title\n      partner\n      allowRegistration\n      hubspotId\n      youtubeId\n      metadata {\n        description\n        title\n        image {\n          url\n          alt\n        }\n      }\n      hosts {\n        name\n        title {\n          jobTitle\n          company\n        }\n        photo {\n          alt\n          url(imgixParams: {w: \"200\", h: \"200\", fit: crop, auto: format})\n        }\n      }\n      featureImage {\n        alt\n        url\n      }\n    }\n  }\n"
variables: {eq: {slug: "introduction-to-REDACTED-march-10-645"}}

However, when I run the same query for the slug introduction-to-REDACTED-march-10, I still get the same response, for the item with the slug introduction-to-REDACTED-march-24

Are my slugs too long and it’s doing a best guess (because the unique information is at the end rather than the start? I haven’t noticed this issue before with blog slugs, which arguably are “more” unique).

EDIT: Actually, I’ve now changed the slugs to be march-10-intro-to-REDACTED and march-24-intro-to-REDACTED and I’m still getting the issue. One of these items was duplicated from the other, but they do have different record ids. Even changing the query itself to break a cache doesn’t seem to be working and I’m still just getting the most recently edited item.

Hello @hannah

Could you send over the query to along with the project that is being used so we can try and reproduce the error on our end?

Thanks, emailed :+1:t2: