Strapi query single record by unique field

Hi there,

Just getting started with integrating Strapi with Gatsby and can’t seem to be able to query records via unique fields. For example I created a contentType called page and it has a unique field called slug . When I query pages I can add a where input and it will return me an array of records that match my where search criteria however when I just query page (without the plural) I do not have the where input as an option. The only unique input I can pass is id . Is this an error in my setup or by API design? Here is a stackoverflow link that goes into more detail if anyone needed context:

Hello, were you able to resolve your problem ? cause I am in the same state

You could use the lower level query API to do this: Single Operations for Query Engine API - Strapi Developer Docs

1 Like