Skip to content

Commit

Permalink
Clarfiy graphql input props typing code comment
Browse files Browse the repository at this point in the history
The initial comment was a bit misleading.

Fixes #3461.
  • Loading branch information
hwillson committed Jun 10, 2018
1 parent cf0e52d commit 6b5f3c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/source/recipes/static-typing.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ type Variables = {
episode: string;
};

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

0 comments on commit 6b5f3c4

Please sign in to comment.