This is primary way our client interacts with remote API's. A Resource
is by default any remote endpoint that provides the client some data source via HTTP. It could be REST API, GraphQL, or some SaaS service such as GraphCMS.
A Resource
is a model that wraps the endpoint for convenience, such that all configureable fields specific to that resource can be easily modified.
Query
Within each Resource
, we could have Queries
that act upon that specific resource. Suppose we have some GraphCMS endpoint specified by a URL, we could have different queries/mutations that interact with the database.
Query here is used more generally. For example if GraphQL we have queries and mutations, but for domain sake, they both fall under Query
.