@mearie/solid 0.0.1-next.5 → 0.1.1

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/README.md CHANGED
@@ -22,10 +22,12 @@ First, create a client and wrap your app with the provider:
22
22
  ```tsx
23
23
  // src/App.tsx
24
24
  import { type Component } from 'solid-js';
25
- import { createClient, httpLink, cacheLink, ClientProvider } from '@mearie/solid';
25
+ import { createClient, httpExchange, cacheExchange, dedupExchange, ClientProvider } from '@mearie/solid';
26
+ import { schema } from '$mearie';
26
27
 
27
28
  const client = createClient({
28
- links: [cacheLink(), httpLink({ url: 'https://api.example.com/graphql' })],
29
+ schema,
30
+ exchanges: [dedupExchange(), cacheExchange(), httpExchange({ url: 'https://api.example.com/graphql' })],
29
31
  });
30
32
 
31
33
  const App: Component = () => {
package/dist/index.d.cts CHANGED
@@ -30,7 +30,7 @@ type Query<T extends Artifact<'query'>> = {
30
30
  error: AggregatedError;
31
31
  refetch: () => void;
32
32
  };
33
- declare const createQuery: <T extends Artifact<"query">>(query: T, ...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, Accessor<CreateQueryOptions>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions>?]) => Query<T>;
33
+ declare const createQuery: <T extends Artifact<"query">>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateQueryOptions>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions>?]) => Query<T>;
34
34
  //#endregion
35
35
  //#region src/create-subscription.d.ts
36
36
  type Subscription<T extends Artifact<'subscription'>> = {
@@ -51,7 +51,7 @@ type CreateSubscriptionOptions<T extends Artifact<'subscription'>> = Subscriptio
51
51
  onData?: (data: DataOf<T>) => void;
52
52
  onError?: (error: AggregatedError) => void;
53
53
  };
54
- declare const createSubscription: <T extends Artifact<"subscription">>(subscription: T, ...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, Accessor<CreateSubscriptionOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateSubscriptionOptions<T>>?]) => Subscription<T>;
54
+ declare const createSubscription: <T extends Artifact<"subscription">>(subscription: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateSubscriptionOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateSubscriptionOptions<T>>?]) => Subscription<T>;
55
55
  //#endregion
56
56
  //#region src/create-mutation.d.ts
57
57
  type MutationResult<T extends Artifact<'mutation'>> = {
@@ -68,7 +68,7 @@ type MutationResult<T extends Artifact<'mutation'>> = {
68
68
  error: AggregatedError;
69
69
  };
70
70
  type CreateMutationOptions = MutationOptions;
71
- type Mutation<T extends Artifact<'mutation'>> = [(...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, CreateMutationOptions?] : [VariablesOf<T>, CreateMutationOptions?]) => Promise<DataOf<T>>, MutationResult<T>];
71
+ type Mutation<T extends Artifact<'mutation'>> = [(...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, CreateMutationOptions?] : [VariablesOf<T>, CreateMutationOptions?]) => Promise<DataOf<T>>, MutationResult<T>];
72
72
  declare const createMutation: <T extends Artifact<"mutation">>(mutation: T) => Mutation<T>;
73
73
  //#endregion
74
74
  //#region src/create-fragment.d.ts
package/dist/index.d.ts CHANGED
@@ -30,7 +30,7 @@ type Query<T extends Artifact<'query'>> = {
30
30
  error: AggregatedError;
31
31
  refetch: () => void;
32
32
  };
33
- declare const createQuery: <T extends Artifact<"query">>(query: T, ...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, Accessor<CreateQueryOptions>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions>?]) => Query<T>;
33
+ declare const createQuery: <T extends Artifact<"query">>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateQueryOptions>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions>?]) => Query<T>;
34
34
  //#endregion
35
35
  //#region src/create-subscription.d.ts
36
36
  type Subscription<T extends Artifact<'subscription'>> = {
@@ -51,7 +51,7 @@ type CreateSubscriptionOptions<T extends Artifact<'subscription'>> = Subscriptio
51
51
  onData?: (data: DataOf<T>) => void;
52
52
  onError?: (error: AggregatedError) => void;
53
53
  };
54
- declare const createSubscription: <T extends Artifact<"subscription">>(subscription: T, ...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, Accessor<CreateSubscriptionOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateSubscriptionOptions<T>>?]) => Subscription<T>;
54
+ declare const createSubscription: <T extends Artifact<"subscription">>(subscription: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateSubscriptionOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateSubscriptionOptions<T>>?]) => Subscription<T>;
55
55
  //#endregion
56
56
  //#region src/create-mutation.d.ts
57
57
  type MutationResult<T extends Artifact<'mutation'>> = {
@@ -68,7 +68,7 @@ type MutationResult<T extends Artifact<'mutation'>> = {
68
68
  error: AggregatedError;
69
69
  };
70
70
  type CreateMutationOptions = MutationOptions;
71
- type Mutation<T extends Artifact<'mutation'>> = [(...[variables, options]: VariablesOf<T> extends undefined ? [undefined?, CreateMutationOptions?] : [VariablesOf<T>, CreateMutationOptions?]) => Promise<DataOf<T>>, MutationResult<T>];
71
+ type Mutation<T extends Artifact<'mutation'>> = [(...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, CreateMutationOptions?] : [VariablesOf<T>, CreateMutationOptions?]) => Promise<DataOf<T>>, MutationResult<T>];
72
72
  declare const createMutation: <T extends Artifact<"mutation">>(mutation: T) => Mutation<T>;
73
73
  //#endregion
74
74
  //#region src/create-fragment.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearie/solid",
3
- "version": "0.0.1-next.5",
3
+ "version": "0.1.1",
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.5"
43
+ "@mearie/core": "0.1.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "solid-js": "^1.9.10",