Skip to content

Commit 3f711cd

Browse files
authored
Update README.md
1 parent 0261606 commit 3f711cd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,17 @@ Todos
630630
- [ ] potential option ideas for `GraphQL`
631631
```jsx
632632
const request = useQuery({ onMount: true })`your graphql query`
633+
634+
const request = useFetch(...)
635+
const userID = 'some-user-uuid'
636+
const res = await request.query({ userID })`
637+
query Todos($userID string!) {
638+
todos(userID: $userID) {
639+
id
640+
title
641+
}
642+
}
643+
`
633644
```
634645
- [ ] add callback to completely overwrite options. Let's say you have `<Provider url='url.com' options={{ headers: 'Authentication': 'Bearer MY_TOKEN' }}><App /></Provider>`, but for one api call, you don't want that header in your `useFetch` at all for one instance in your app. This would allow you to remove that
635646
```jsx

0 commit comments

Comments
 (0)