@quilted/create 0.1.82 → 0.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @quilted/create
|
|
2
2
|
|
|
3
|
+
## 0.1.83
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b8b0e5e2`](https://github.com/lemonmade/quilt/commit/b8b0e5e2bac4192d8e6b17b93868acec8524c611) Thanks [@lemonmade](https://github.com/lemonmade)! - Fix some more GraphQL template type issues
|
|
8
|
+
|
|
3
9
|
## 0.1.82
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -4,11 +4,7 @@ import {HTML} from '@quilted/quilt/html';
|
|
|
4
4
|
import {Routing, useRoutes} from '@quilted/quilt/navigate';
|
|
5
5
|
import {Localization, useLocaleFromEnvironment} from '@quilted/quilt/localize';
|
|
6
6
|
import {type PropsWithChildren} from '@quilted/quilt/react/tools';
|
|
7
|
-
import {
|
|
8
|
-
GraphQLContext,
|
|
9
|
-
createGraphQLHttpFetch,
|
|
10
|
-
type GraphQLFetch,
|
|
11
|
-
} from '@quilted/quilt/graphql';
|
|
7
|
+
import {GraphQLContext, type GraphQLFetch} from '@quilted/quilt/graphql';
|
|
12
8
|
|
|
13
9
|
import {ReactQueryContext} from '@quilted/react-query';
|
|
14
10
|
import {QueryClient} from '@tanstack/react-query';
|
|
@@ -25,7 +21,7 @@ import {
|
|
|
25
21
|
} from './shared/context.ts';
|
|
26
22
|
|
|
27
23
|
export interface AppProps extends AppContextType {
|
|
28
|
-
fetchGraphQL
|
|
24
|
+
fetchGraphQL: GraphQLFetch;
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
// The root component for your application. You will typically render any
|
|
@@ -61,16 +57,14 @@ function Routes() {
|
|
|
61
57
|
// This component renders any app-wide context.
|
|
62
58
|
function AppContext({
|
|
63
59
|
children,
|
|
64
|
-
fetchGraphQL
|
|
60
|
+
fetchGraphQL,
|
|
65
61
|
...context
|
|
66
62
|
}: PropsWithChildren<AppProps>) {
|
|
67
|
-
const {
|
|
63
|
+
const {queryClient} = useMemo(() => {
|
|
68
64
|
return {
|
|
69
|
-
fetchGraphQL:
|
|
70
|
-
customFetchGraphQL ?? createGraphQLHttpFetch({url: '/api/graphql'}),
|
|
71
65
|
queryClient: new QueryClient(),
|
|
72
66
|
};
|
|
73
|
-
}, [
|
|
67
|
+
}, []);
|
|
74
68
|
|
|
75
69
|
return (
|
|
76
70
|
<GraphQLContext fetch={fetchGraphQL}>
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import '@quilted/quilt/globals';
|
|
2
|
+
|
|
2
3
|
import {hydrateRoot} from 'react-dom/client';
|
|
4
|
+
import {createGraphQLFetchOverHTTP} from '@quilted/quilt/graphql';
|
|
3
5
|
|
|
4
6
|
import {App} from './App.tsx';
|
|
5
7
|
|
|
6
8
|
const element = document.querySelector('#app')!;
|
|
7
9
|
|
|
8
|
-
hydrateRoot(
|
|
10
|
+
hydrateRoot(
|
|
11
|
+
element,
|
|
12
|
+
<App fetchGraphQL={createGraphQLFetchOverHTTP({url: '/api/graphql'})} />,
|
|
13
|
+
);
|