-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add fetch imp as third param in custom fetch
- Loading branch information
1 parent
95dccc0
commit 003c769
Showing
9 changed files
with
112 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ts/gql-query/__tests__/__snapshots__/isomorphic-fetch-imp/renders.expected/loading.0.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div> | ||
<noscript | ||
id="GENERATED-0" | ||
/> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
...ts/gql-query/__tests__/__snapshots__/isomorphic-fetch-imp/renders.expected/loading.1.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div> | ||
<noscript | ||
id="GENERATED-0" | ||
/> | ||
</div> | ||
<div | ||
id="GENERATED-1" | ||
style="display:none" | ||
> | ||
<span> | ||
Hello world! | ||
</span> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
...ts/gql-query/__tests__/__snapshots__/isomorphic-fetch-imp/renders.expected/loading.2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div> | ||
<span> | ||
Hello world! | ||
</span> | ||
</div> | ||
<div | ||
id="GENERATED-0" | ||
style="display:none" | ||
/> |
12 changes: 12 additions & 0 deletions
12
src/components/gql-query/__tests__/fixtures/isomorphic-fetch-imp/components/app.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { gql } from "../../../../../../index"; | ||
static const QUERY = gql` | ||
{ | ||
hello | ||
} | ||
`; | ||
|
||
class {} | ||
|
||
<gql-query query=QUERY> | ||
<@then|{ data }|><span>${data.hello}</span></@then> | ||
</gql-query> |
13 changes: 13 additions & 0 deletions
13
src/components/gql-query/__tests__/fixtures/isomorphic-fetch-imp/index.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Simple Example</title> | ||
<esbuild-assets/> | ||
</head> | ||
<body> | ||
<gql-client url=input.graphqlURL fetch=((resource, options, fetchImp) => fetchImp(resource, options)) /> | ||
<app /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters