Query by URL across content types

  • 15 November 2022
  • 1 reply
  • 24 views

A common use case in Contentstack is querying for a content entry by URL.

If you have multiple possible content types, an efficient way of finding the right entry is via the GraphQL API. You simply query all the possible content types with the given URL and only the correct type will return a result.

Here is an example of such a query:

 


1 reply

Can we do the same using the JS SDK without making multiple queries?

Reply