buildgql 0.1.0 → 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/dist/adapters/apollo.d.cts +4 -2
- package/dist/adapters/apollo.d.ts +4 -2
- package/dist/adapters/urql.d.cts +4 -2
- package/dist/adapters/urql.d.ts +4 -2
- package/dist/cli/config.d.cts +2 -1
- package/dist/cli/config.d.ts +2 -1
- package/dist/client/index.d.cts +4 -2
- package/dist/client/index.d.ts +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/{operation-DxbEION8.d.cts → operation-C5o8JP1y.d.cts} +2 -1
- package/dist/{operation-DxbEION8.d.ts → operation-C5o8JP1y.d.ts} +2 -1
- package/package.json +4 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as VarsArg } from '../operation-C5o8JP1y.cjs';
|
|
2
|
+
import { Operation } from '../index.cjs';
|
|
2
3
|
import { T as TypedDocumentNode } from '../document-BZ9RdxXB.cjs';
|
|
3
4
|
import 'graphql';
|
|
4
5
|
|
|
@@ -25,4 +26,5 @@ declare function toApolloQuery<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>):
|
|
|
25
26
|
/** `{ mutation, variables }` for `apolloClient.mutate()`. */
|
|
26
27
|
declare function toApolloMutation<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>): ApolloMutationArgs<R, V>;
|
|
27
28
|
|
|
28
|
-
export {
|
|
29
|
+
export { TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
|
|
30
|
+
export type { ApolloMutationArgs, ApolloQueryArgs };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as VarsArg } from '../operation-C5o8JP1y.js';
|
|
2
|
+
import { Operation } from '../index.js';
|
|
2
3
|
import { T as TypedDocumentNode } from '../document-BZ9RdxXB.js';
|
|
3
4
|
import 'graphql';
|
|
4
5
|
|
|
@@ -25,4 +26,5 @@ declare function toApolloQuery<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>):
|
|
|
25
26
|
/** `{ mutation, variables }` for `apolloClient.mutate()`. */
|
|
26
27
|
declare function toApolloMutation<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>): ApolloMutationArgs<R, V>;
|
|
27
28
|
|
|
28
|
-
export {
|
|
29
|
+
export { TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
|
|
30
|
+
export type { ApolloMutationArgs, ApolloQueryArgs };
|
package/dist/adapters/urql.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as VarsArg } from '../operation-C5o8JP1y.cjs';
|
|
2
|
+
import { Operation } from '../index.cjs';
|
|
2
3
|
import { T as TypedDocumentNode } from '../document-BZ9RdxXB.cjs';
|
|
3
4
|
import 'graphql';
|
|
4
5
|
|
|
@@ -23,4 +24,5 @@ declare function urqlDocument<R, V>(op: Operation<R, V>): TypedDocumentNode<R, V
|
|
|
23
24
|
*/
|
|
24
25
|
declare function toUrqlArgs<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>): UrqlArgs<R, V>;
|
|
25
26
|
|
|
26
|
-
export { TypedDocumentNode,
|
|
27
|
+
export { TypedDocumentNode, toUrqlArgs, urqlDocument };
|
|
28
|
+
export type { UrqlArgs };
|
package/dist/adapters/urql.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as VarsArg } from '../operation-C5o8JP1y.js';
|
|
2
|
+
import { Operation } from '../index.js';
|
|
2
3
|
import { T as TypedDocumentNode } from '../document-BZ9RdxXB.js';
|
|
3
4
|
import 'graphql';
|
|
4
5
|
|
|
@@ -23,4 +24,5 @@ declare function urqlDocument<R, V>(op: Operation<R, V>): TypedDocumentNode<R, V
|
|
|
23
24
|
*/
|
|
24
25
|
declare function toUrqlArgs<R, V>(op: Operation<R, V>, ...rest: VarsArg<V>): UrqlArgs<R, V>;
|
|
25
26
|
|
|
26
|
-
export { TypedDocumentNode,
|
|
27
|
+
export { TypedDocumentNode, toUrqlArgs, urqlDocument };
|
|
28
|
+
export type { UrqlArgs };
|
package/dist/cli/config.d.cts
CHANGED
|
@@ -70,4 +70,5 @@ declare function loadConfig(cwd?: string, importModule?: ConfigImporter): Promis
|
|
|
70
70
|
}>;
|
|
71
71
|
declare function resolveOutputDir(config: BuildGQLConfig, cwd: string): string;
|
|
72
72
|
|
|
73
|
-
export {
|
|
73
|
+
export { defineConfig, loadConfig, resolveOutputDir };
|
|
74
|
+
export type { BuildGQLConfig, ClientKind, ConfigImporter, ScalarConfig, ScalarTypeConfig };
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -70,4 +70,5 @@ declare function loadConfig(cwd?: string, importModule?: ConfigImporter): Promis
|
|
|
70
70
|
}>;
|
|
71
71
|
declare function resolveOutputDir(config: BuildGQLConfig, cwd: string): string;
|
|
72
72
|
|
|
73
|
-
export {
|
|
73
|
+
export { defineConfig, loadConfig, resolveOutputDir };
|
|
74
|
+
export type { BuildGQLConfig, ClientKind, ConfigImporter, ScalarConfig, ScalarTypeConfig };
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as HasVars } from '../operation-C5o8JP1y.cjs';
|
|
2
|
+
import { Operation } from '../index.cjs';
|
|
2
3
|
|
|
3
4
|
/** Headers, or a function producing them — evaluated per request so tokens can refresh. */
|
|
4
5
|
type HeadersSource = HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
|
|
@@ -90,4 +91,5 @@ interface WsTransportOptions {
|
|
|
90
91
|
/** graphql-ws protocol: connection_init -> subscribe -> next* -> complete. */
|
|
91
92
|
declare function wsTransport(opts: WsTransportOptions): SubscriptionTransport;
|
|
92
93
|
|
|
93
|
-
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError,
|
|
94
|
+
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError, createClient, sseTransport, wsTransport };
|
|
95
|
+
export type { Client, ClientOptions, ExecuteOptions, GraphQLFormattedError, HeadersSource, SseTransportOptions, StreamChunk, SubscribePayload, SubscriptionTransport, WsTransportOptions };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as HasVars } from '../operation-C5o8JP1y.js';
|
|
2
|
+
import { Operation } from '../index.js';
|
|
2
3
|
|
|
3
4
|
/** Headers, or a function producing them — evaluated per request so tokens can refresh. */
|
|
4
5
|
type HeadersSource = HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
|
|
@@ -90,4 +91,5 @@ interface WsTransportOptions {
|
|
|
90
91
|
/** graphql-ws protocol: connection_init -> subscribe -> next* -> complete. */
|
|
91
92
|
declare function wsTransport(opts: WsTransportOptions): SubscriptionTransport;
|
|
92
93
|
|
|
93
|
-
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError,
|
|
94
|
+
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError, createClient, sseTransport, wsTransport };
|
|
95
|
+
export type { Client, ClientOptions, ExecuteOptions, GraphQLFormattedError, HeadersSource, SseTransportOptions, StreamChunk, SubscribePayload, SubscriptionTransport, WsTransportOptions };
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError, Client, ClientOptions, ExecuteOptions, GraphQLFormattedError, HeadersSource, SseTransportOptions, StreamChunk, SubscribePayload, SubscriptionTransport, WsTransportOptions, createClient, sseTransport, wsTransport } from './client/index.cjs';
|
|
2
|
-
import { N as NonNull, A as ArgSpec, F as FieldSelection, a as ArgsInput, b as VarsOf, S as SelectionNode, c as Selected, d as VarsIn, e as VarMarker, f as FragmentDefinition, R as RESULT, g as VARS, h as FragmentSpread, I as InlineFragment, i as Simplify, j as VarProxy } from './operation-
|
|
3
|
-
export { k as AnyFieldSelection, l as Arg, D as Directive, K as KEY, O as Operation, U as UnionToIntersection, m as VarRef, n as makeMutation, o as makeQuery, p as makeSubscription } from './operation-
|
|
2
|
+
import { N as NonNull, A as ArgSpec, F as FieldSelection, a as ArgsInput, b as VarsOf, S as SelectionNode, c as Selected, d as VarsIn, e as VarMarker, f as FragmentDefinition, R as RESULT, g as VARS, h as FragmentSpread, I as InlineFragment, i as Simplify, j as VarProxy } from './operation-C5o8JP1y.cjs';
|
|
3
|
+
export { k as AnyFieldSelection, l as Arg, D as Directive, K as KEY, O as Operation, U as UnionToIntersection, m as VarRef, n as makeMutation, o as makeQuery, p as makeSubscription } from './operation-C5o8JP1y.cjs';
|
|
4
4
|
|
|
5
5
|
type WrapTok = 'l' | '!';
|
|
6
6
|
/** Outer-to-inner wrapper tuple. `[]` means "nullable named type". */
|
|
@@ -80,6 +80,7 @@ declare const $: VarProxy;
|
|
|
80
80
|
declare function v<N extends string>(name: N): VarMarker<N>;
|
|
81
81
|
|
|
82
82
|
/** Kept in step with package.json by `test/unit/public-api.test.ts`. */
|
|
83
|
-
declare const VERSION = "0.1.
|
|
83
|
+
declare const VERSION = "0.1.1";
|
|
84
84
|
|
|
85
|
-
export { $,
|
|
85
|
+
export { $, ArgSpec, ArgsInput, FieldSelection, FragmentDefinition, FragmentSpread, InlineFragment, NonNull, RESULT, Selected, SelectionNode, Simplify, VARS, VERSION, VarMarker, VarProxy, VarsIn, VarsOf, argSpec, include, leafField, leafFieldArgs, makeFragment, objectField, objectFieldArgs, on, skip, spread, v };
|
|
86
|
+
export type { Apply, Fragment, Wrap, WrapTok };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError, Client, ClientOptions, ExecuteOptions, GraphQLFormattedError, HeadersSource, SseTransportOptions, StreamChunk, SubscribePayload, SubscriptionTransport, WsTransportOptions, createClient, sseTransport, wsTransport } from './client/index.js';
|
|
2
|
-
import { N as NonNull, A as ArgSpec, F as FieldSelection, a as ArgsInput, b as VarsOf, S as SelectionNode, c as Selected, d as VarsIn, e as VarMarker, f as FragmentDefinition, R as RESULT, g as VARS, h as FragmentSpread, I as InlineFragment, i as Simplify, j as VarProxy } from './operation-
|
|
3
|
-
export { k as AnyFieldSelection, l as Arg, D as Directive, K as KEY, O as Operation, U as UnionToIntersection, m as VarRef, n as makeMutation, o as makeQuery, p as makeSubscription } from './operation-
|
|
2
|
+
import { N as NonNull, A as ArgSpec, F as FieldSelection, a as ArgsInput, b as VarsOf, S as SelectionNode, c as Selected, d as VarsIn, e as VarMarker, f as FragmentDefinition, R as RESULT, g as VARS, h as FragmentSpread, I as InlineFragment, i as Simplify, j as VarProxy } from './operation-C5o8JP1y.js';
|
|
3
|
+
export { k as AnyFieldSelection, l as Arg, D as Directive, K as KEY, O as Operation, U as UnionToIntersection, m as VarRef, n as makeMutation, o as makeQuery, p as makeSubscription } from './operation-C5o8JP1y.js';
|
|
4
4
|
|
|
5
5
|
type WrapTok = 'l' | '!';
|
|
6
6
|
/** Outer-to-inner wrapper tuple. `[]` means "nullable named type". */
|
|
@@ -80,6 +80,7 @@ declare const $: VarProxy;
|
|
|
80
80
|
declare function v<N extends string>(name: N): VarMarker<N>;
|
|
81
81
|
|
|
82
82
|
/** Kept in step with package.json by `test/unit/public-api.test.ts`. */
|
|
83
|
-
declare const VERSION = "0.1.
|
|
83
|
+
declare const VERSION = "0.1.1";
|
|
84
84
|
|
|
85
|
-
export { $,
|
|
85
|
+
export { $, ArgSpec, ArgsInput, FieldSelection, FragmentDefinition, FragmentSpread, InlineFragment, NonNull, RESULT, Selected, SelectionNode, Simplify, VARS, VERSION, VarMarker, VarProxy, VarsIn, VarsOf, argSpec, include, leafField, leafFieldArgs, makeFragment, objectField, objectFieldArgs, on, skip, spread, v };
|
|
86
|
+
export type { Apply, Fragment, Wrap, WrapTok };
|
package/dist/index.js
CHANGED
|
@@ -197,4 +197,5 @@ declare const makeQuery: <Root>(root: Root) => <S extends readonly SelectionNode
|
|
|
197
197
|
declare const makeMutation: <Root>(root: Root) => <S extends readonly SelectionNode[]>(name: string, build: (v: VarProxy, r: Root) => readonly [...S]) => Operation<Selected<S>, Simplify<VarsIn<S>>>;
|
|
198
198
|
declare const makeSubscription: <Root>(root: Root) => <S extends readonly SelectionNode[]>(name: string, build: (v: VarProxy, r: Root) => readonly [...S]) => Operation<Selected<S>, Simplify<VarsIn<S>>>;
|
|
199
199
|
|
|
200
|
-
export {
|
|
200
|
+
export { KEY as K, RESULT as R, VARS as g, makeMutation as n, makeQuery as o, makeSubscription as p };
|
|
201
|
+
export type { ArgSpec as A, Directive as D, FieldSelection as F, HasVars as H, InlineFragment as I, NonNull as N, Operation as O, SelectionNode as S, UnionToIntersection as U, VarsArg as V, ArgsInput as a, VarsOf as b, Selected as c, VarsIn as d, VarMarker as e, FragmentDefinition as f, FragmentSpread as h, Simplify as i, VarProxy as j, AnyFieldSelection as k, Arg as l, VarRef as m };
|
|
@@ -197,4 +197,5 @@ declare const makeQuery: <Root>(root: Root) => <S extends readonly SelectionNode
|
|
|
197
197
|
declare const makeMutation: <Root>(root: Root) => <S extends readonly SelectionNode[]>(name: string, build: (v: VarProxy, r: Root) => readonly [...S]) => Operation<Selected<S>, Simplify<VarsIn<S>>>;
|
|
198
198
|
declare const makeSubscription: <Root>(root: Root) => <S extends readonly SelectionNode[]>(name: string, build: (v: VarProxy, r: Root) => readonly [...S]) => Operation<Selected<S>, Simplify<VarsIn<S>>>;
|
|
199
199
|
|
|
200
|
-
export {
|
|
200
|
+
export { KEY as K, RESULT as R, VARS as g, makeMutation as n, makeQuery as o, makeSubscription as p };
|
|
201
|
+
export type { ArgSpec as A, Directive as D, FieldSelection as F, HasVars as H, InlineFragment as I, NonNull as N, Operation as O, SelectionNode as S, UnionToIntersection as U, VarsArg as V, ArgsInput as a, VarsOf as b, Selected as c, VarsIn as d, VarMarker as e, FragmentDefinition as f, FragmentSpread as h, Simplify as i, VarProxy as j, AnyFieldSelection as k, Arg as l, VarRef as m };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildgql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Type-safe GraphQL query builder generated from introspection",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -133,16 +133,16 @@
|
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@eslint/js": "^9.39.5",
|
|
135
135
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
136
|
-
"@types/node": "^
|
|
136
|
+
"@types/node": "^26.6.6",
|
|
137
137
|
"eslint": "^9.39.5",
|
|
138
138
|
"eslint-config-prettier": "^9.1.2",
|
|
139
139
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
140
140
|
"graphql": "^16.14.2",
|
|
141
141
|
"graphql-yoga": "^5.21.2",
|
|
142
142
|
"prettier": "^3.9.6",
|
|
143
|
-
"tsup": "^
|
|
143
|
+
"tsup": "^9.0.0",
|
|
144
144
|
"typescript": "^5.9.3",
|
|
145
145
|
"typescript-eslint": "^8.66.0",
|
|
146
|
-
"vitest": "^
|
|
146
|
+
"vitest": "^5.0.5"
|
|
147
147
|
}
|
|
148
148
|
}
|