https://graphql.api.rye.com/v1/query
.
In this guide, we’ll explore the fundamental concepts of GraphQL, including queries, mutations, object types, and the GraphQL playground. Let’s get started!
Product
object type in Rye’s API may have fields like id
, title
, price
, description
, etc.
You can query specific fields of an object by including them in your query. This allows you to retrieve only the data you need, reducing the amount of data transferred over the network.
productByID
query, for instance, is capable of returning either an AmazonProduct
or a ShopifyProduct
object depending on the product ID.
Common fields between these types like title
or price
can be queried directly. Fields specific to a particular type, on the other hand, must be queried using “inline fragment” syntax. Here’s an example of how to retrieve the ShopifyVariant
-specific price
field: