Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add section on actions vs remote schemas (close #4093) #4284

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Read more about the session argument for computed fields in the [docs](https://h
- console: avoid count queries for large tables (#4692)
- console: add read replica support section to pro popup (#4118)
- cli: list all avialable commands in root command help (fix #4623)
- docs: add section on actions vs. remote schemas to actions documentation (#4284)

## `v1.2.0`

Expand Down
16 changes: 16 additions & 0 deletions docs/graphql/manual/actions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ How it works?
* The action response is returned to the client synchronously or asynchronously
based on the kind.

Actions vs. remote schemas
--------------------------

Both actions and remote schemas can be used to extend Hasura with business logic.
However, they have slightly different use cases.

**Actions**

Actions can be used when we want to call a REST endpoint from Hasura as a resolver for some custom types.
They are especially useful for setting up serverless functions as resolvers.

**Remote schemas**

If you have an existing GraphQL API or if you're comfortable building a GraphQL server yourself,
you can use :ref:`remote schemas <remote_schemas>` to add custom types and resolvers.

Learn more
----------

Expand Down