Skip to content

Commit

Permalink
Update docs now that resolvers are stable
Browse files Browse the repository at this point in the history
Reviewed By: monicatang

Differential Revision: D63657391

fbshipit-source-id: 48b782987149a9e799f839446c7cf4a413059b3b
  • Loading branch information
captbaritone authored and facebook-github-bot committed Oct 1, 2024
1 parent 4e5377b commit d10786b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions website/docs/guides/relay-resolvers/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: /guides/relay-resolvers/introduction
description: An introduction to Relay Resolvers
---

Relay Resolvers are a **experimental** Relay feature which allow you to augment Relay’s GraphQL graph with values that are known only on the client. This allows you to schematize client state in the same way that you model server state, and to use Relay’s familiar data-fetching APIs to access that state. Client state can include both data from client-side data stores as well as derived data that is computed from other values in the graph.
Relay Resolvers are a Relay feature which allow you to augment Relay’s GraphQL graph with values that are known only on the client. This allows you to schematize client state in the same way that you model server state, and to use Relay’s familiar data-fetching APIs to access that state. Client state can include both data from client-side data stores as well as derived data that is computed from other values in the graph.

By modeling derived and client state in the graph, Relay can present a unified data access API for product developers. All globally relevant data that a product engineer wants to access can be discovered and efficiently obtained from the same structured GraphQL schema. Additionally resolvers provide a number of runtime benefits:

Expand All @@ -27,10 +27,6 @@ Relay Resolvers are useful for modeling a number of different kinds of data. Her

## Defining a Resolver

:::warning
Because Resolvers are still an **experimental feature**, before you can begin to use Resolvers in Relay, you'll need to enable them. See [Enabling Relay Resolvers](./enabling.md) for instructions.
:::

Resolvers are defined using exported functions that are annotated with a special [`@RelayResolver` docblock](../../api-reference/relay-resolvers/docblock-format.md). These docblocks are visible to the Relay compiler, and allow the compiler to build up your client schema and automatically import your function in Relay’s generated artifacts. Resolver functions may be defined in any file in your Relay project, though you may wish to define some convention for where they live within your codebase.

The simplest resolver augments an existing type and does not have any inputs:
Expand Down

0 comments on commit d10786b

Please sign in to comment.