Skip to content

Commit

Permalink
Add connectors callouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Meschreiber committed Oct 4, 2024
1 parent e47c95e commit 8f471a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/data/fetching-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ flowchart LR;
client --Sends query--> ApolloServer;
```

<Tip>

[Learn how Apollo Connectors](/graphos/schema-design/connectors/) simplify incorporating REST APIs into your graph.

</Tip>

Because your server can use multiple various data sources, keeping your [resolvers](./resolvers) tidy becomes _even more_ important.

For this reason, we recommend creating individual data source classes to encapsulate the logic of fetching data from a particular source, providing methods that resolvers can use to access data neatly. You can additionally customize your data source classes to help with caching, deduplication, or errors while resolving operations.
Expand Down
6 changes: 6 additions & 0 deletions docs/source/data/fetching-rest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ description: Using RESTDataSource to fetch data from REST APIs

import TopLevelAwait from "../shared/top-level-await.mdx"

<Tip>

[Learn how Apollo Connectors](/graphos/schema-design/connectors/) simplify incorporating REST APIs into your graph.

</Tip>

> See the [`@apollo/datasource-rest` README](https://github.com/apollographql/datasource-rest) for the full details of the `RESTDataSource` API.
The `RESTDataSource` class simplifies fetching data from REST APIs and helps handle caching, request deduplication, and errors while resolving operations.
Expand Down

0 comments on commit 8f471a8

Please sign in to comment.