@mearie/react 0.0.1-next.4 → 0.0.1-next.5

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/dist/index.d.cts CHANGED
@@ -1,17 +1,17 @@
1
- import { AggregatedError, Artifact, Client, DataOf, FragmentOptions, FragmentRefs, MutationOptions, QueryOptions, SubscriptionOptions, VariablesOf } from "@mearie/core";
1
+ import { AggregatedError, Artifact, Client, DataOf, FragmentOptions, FragmentRefs, MutationOptions, QueryOptions, SchemaMeta, SubscriptionOptions, VariablesOf } from "@mearie/core";
2
2
  import { ReactNode } from "react";
3
3
  export * from "@mearie/core";
4
4
 
5
5
  //#region src/client-provider.d.ts
6
- type ClientProviderProps = {
7
- client: Client;
6
+ type ClientProviderProps<TMeta extends SchemaMeta = SchemaMeta> = {
7
+ client: Client<TMeta>;
8
8
  children: ReactNode;
9
9
  };
10
- declare const ClientProvider: ({
10
+ declare const ClientProvider: <TMeta extends SchemaMeta = SchemaMeta>({
11
11
  client,
12
12
  children
13
- }: ClientProviderProps) => ReactNode;
14
- declare const useClient: () => Client;
13
+ }: ClientProviderProps<TMeta>) => ReactNode;
14
+ declare const useClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
15
15
  //#endregion
16
16
  //#region src/use-query.d.ts
17
17
  type Query<T extends Artifact<'query'>> = {
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { AggregatedError, Artifact, Client, DataOf, FragmentOptions, FragmentRefs, MutationOptions, QueryOptions, SubscriptionOptions, VariablesOf } from "@mearie/core";
1
+ import { AggregatedError, Artifact, Client, DataOf, FragmentOptions, FragmentRefs, MutationOptions, QueryOptions, SchemaMeta, SubscriptionOptions, VariablesOf } from "@mearie/core";
2
2
  import { ReactNode } from "react";
3
3
  export * from "@mearie/core";
4
4
 
5
5
  //#region src/client-provider.d.ts
6
- type ClientProviderProps = {
7
- client: Client;
6
+ type ClientProviderProps<TMeta extends SchemaMeta = SchemaMeta> = {
7
+ client: Client<TMeta>;
8
8
  children: ReactNode;
9
9
  };
10
- declare const ClientProvider: ({
10
+ declare const ClientProvider: <TMeta extends SchemaMeta = SchemaMeta>({
11
11
  client,
12
12
  children
13
- }: ClientProviderProps) => ReactNode;
14
- declare const useClient: () => Client;
13
+ }: ClientProviderProps<TMeta>) => ReactNode;
14
+ declare const useClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
15
15
  //#endregion
16
16
  //#region src/use-query.d.ts
17
17
  type Query<T extends Artifact<'query'>> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearie/react",
3
- "version": "0.0.1-next.4",
3
+ "version": "0.0.1-next.5",
4
4
  "description": "Type-safe, zero-overhead GraphQL client",
5
5
  "keywords": [
6
6
  "graphql",
@@ -40,7 +40,7 @@
40
40
  "README.md"
41
41
  ],
42
42
  "dependencies": {
43
- "@mearie/core": "0.0.1-next.4"
43
+ "@mearie/core": "0.0.1-next.5"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/react": "^19.2.2",