Skip to content

Commit 2eb494e

Browse files
authored
Merge pull request #3567 from apollographql/issue-3461
Clarfiy `graphql` input props typing code comment
2 parents cf0e52d + 6b5f3c4 commit 2eb494e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/source/recipes/static-typing.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ type Variables = {
7272
episode: string;
7373
};
7474

75-
// note the first parameter is empty here, we will explain that below
75+
// Note that the first parameter here is an empty Object, which means we're
76+
// not checking incoming props for type safety in this example. The next
77+
// example (in the "Options" section) shows how the type safety of incoming
78+
// props can be ensured.
7679
const withCharacter = graphql<{}, Response, Variables>(HERO_QUERY, {
7780
options: () => ({
7881
variables: { episode: "JEDI" }
@@ -289,4 +292,3 @@ export const withCharacter = graphql<InputProps, Response, {}, Prop>(HERO_QUERY,
289292
})
290293
});
291294
```
292-

0 commit comments

Comments
 (0)