Skip to content

Commit

Permalink
Align RESTDataSource docs example
Browse files Browse the repository at this point in the history
The params option in RESTDataSource was updated to a type which
only accepts strings for its values. The docs were updated in the
RESTDataSource repo example, but not in our server docs example.

Ref: apollographql/datasource-rest#134
  • Loading branch information
trevor-scheer committed Jun 13, 2023
1 parent 03991de commit 864e861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/data/fetching-rest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MoviesAPI extends RESTDataSource {
async getMostViewedMovies(limit = '10'): Promise<Movie[]> {
const data = await this.get('movies', {
params: {
per_page: limit,
per_page: limit.toString(), // all params entries should be strings,
order_by: 'most_viewed',
},
});
Expand Down

0 comments on commit 864e861

Please sign in to comment.