Skip to content

Commit

Permalink
docs: add section on actions vs remote schemas (close #4093) (#4284)
Browse files Browse the repository at this point in the history
* add section on actions vs remote schemas

* fix language

* add changelog

* update actionvs vs remote schemas

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
  • Loading branch information
3 people committed May 11, 2020
1 parent 506af29 commit d335743
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
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

0 comments on commit d335743

Please sign in to comment.