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.
@@ -1,4 +1,5 @@
1
- import { O as Operation, V as VarsArg } from '../operation-DxbEION8.cjs';
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 { type ApolloMutationArgs, type ApolloQueryArgs, TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
29
+ export { TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
30
+ export type { ApolloMutationArgs, ApolloQueryArgs };
@@ -1,4 +1,5 @@
1
- import { O as Operation, V as VarsArg } from '../operation-DxbEION8.js';
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 { type ApolloMutationArgs, type ApolloQueryArgs, TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
29
+ export { TypedDocumentNode, apolloDocument, toApolloMutation, toApolloQuery };
30
+ export type { ApolloMutationArgs, ApolloQueryArgs };
@@ -1,4 +1,5 @@
1
- import { O as Operation, V as VarsArg } from '../operation-DxbEION8.cjs';
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, type UrqlArgs, toUrqlArgs, urqlDocument };
27
+ export { TypedDocumentNode, toUrqlArgs, urqlDocument };
28
+ export type { UrqlArgs };
@@ -1,4 +1,5 @@
1
- import { O as Operation, V as VarsArg } from '../operation-DxbEION8.js';
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, type UrqlArgs, toUrqlArgs, urqlDocument };
27
+ export { TypedDocumentNode, toUrqlArgs, urqlDocument };
28
+ export type { UrqlArgs };
@@ -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 { type BuildGQLConfig, type ClientKind, type ConfigImporter, type ScalarConfig, type ScalarTypeConfig, defineConfig, loadConfig, resolveOutputDir };
73
+ export { defineConfig, loadConfig, resolveOutputDir };
74
+ export type { BuildGQLConfig, ClientKind, ConfigImporter, ScalarConfig, ScalarTypeConfig };
@@ -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 { type BuildGQLConfig, type ClientKind, type ConfigImporter, type ScalarConfig, type ScalarTypeConfig, defineConfig, loadConfig, resolveOutputDir };
73
+ export { defineConfig, loadConfig, resolveOutputDir };
74
+ export type { BuildGQLConfig, ClientKind, ConfigImporter, ScalarConfig, ScalarTypeConfig };
@@ -1,4 +1,5 @@
1
- import { O as Operation, H as HasVars } from '../operation-DxbEION8.cjs';
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, type Client, type ClientOptions, type ExecuteOptions, type GraphQLFormattedError, type HeadersSource, type SseTransportOptions, type StreamChunk, type SubscribePayload, type SubscriptionTransport, type WsTransportOptions, createClient, sseTransport, wsTransport };
94
+ export { BuildGQLError, BuildGQLHttpError, BuildGQLResponseError, createClient, sseTransport, wsTransport };
95
+ export type { Client, ClientOptions, ExecuteOptions, GraphQLFormattedError, HeadersSource, SseTransportOptions, StreamChunk, SubscribePayload, SubscriptionTransport, WsTransportOptions };
@@ -1,4 +1,5 @@
1
- import { O as Operation, H as HasVars } from '../operation-DxbEION8.js';
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, type Client, type ClientOptions, type ExecuteOptions, type GraphQLFormattedError, type HeadersSource, type SseTransportOptions, type StreamChunk, type SubscribePayload, type SubscriptionTransport, type WsTransportOptions, createClient, sseTransport, wsTransport };
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
@@ -286,7 +286,7 @@ var makeMutation = makeOperation("mutation");
286
286
  var makeSubscription = makeOperation("subscription");
287
287
 
288
288
  // src/index.ts
289
- var VERSION = "0.1.0";
289
+ var VERSION = "0.1.1";
290
290
 
291
291
 
292
292
 
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-DxbEION8.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-DxbEION8.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-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.0";
83
+ declare const VERSION = "0.1.1";
84
84
 
85
- export { $, type Apply, ArgSpec, ArgsInput, FieldSelection, type Fragment, FragmentDefinition, FragmentSpread, InlineFragment, NonNull, RESULT, Selected, SelectionNode, Simplify, VARS, VERSION, VarMarker, VarProxy, VarsIn, VarsOf, type Wrap, type WrapTok, argSpec, include, leafField, leafFieldArgs, makeFragment, objectField, objectFieldArgs, on, skip, spread, v };
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-DxbEION8.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-DxbEION8.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-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.0";
83
+ declare const VERSION = "0.1.1";
84
84
 
85
- export { $, type Apply, ArgSpec, ArgsInput, FieldSelection, type Fragment, FragmentDefinition, FragmentSpread, InlineFragment, NonNull, RESULT, Selected, SelectionNode, Simplify, VARS, VERSION, VarMarker, VarProxy, VarsIn, VarsOf, type Wrap, type WrapTok, argSpec, include, leafField, leafFieldArgs, makeFragment, objectField, objectFieldArgs, on, skip, spread, v };
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
@@ -286,7 +286,7 @@ var makeMutation = makeOperation("mutation");
286
286
  var makeSubscription = makeOperation("subscription");
287
287
 
288
288
  // src/index.ts
289
- var VERSION = "0.1.0";
289
+ var VERSION = "0.1.1";
290
290
  export {
291
291
  $,
292
292
  BuildGQLError,
@@ -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 { type ArgSpec as A, type Directive as D, type FieldSelection as F, type HasVars as H, type InlineFragment as I, KEY as K, type NonNull as N, type Operation as O, RESULT as R, type SelectionNode as S, type UnionToIntersection as U, type VarsArg as V, type ArgsInput as a, type VarsOf as b, type Selected as c, type VarsIn as d, type VarMarker as e, type FragmentDefinition as f, VARS as g, type FragmentSpread as h, type Simplify as i, type VarProxy as j, type AnyFieldSelection as k, type Arg as l, type VarRef as m, makeMutation as n, makeQuery as o, makeSubscription as p };
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 { type ArgSpec as A, type Directive as D, type FieldSelection as F, type HasVars as H, type InlineFragment as I, KEY as K, type NonNull as N, type Operation as O, RESULT as R, type SelectionNode as S, type UnionToIntersection as U, type VarsArg as V, type ArgsInput as a, type VarsOf as b, type Selected as c, type VarsIn as d, type VarMarker as e, type FragmentDefinition as f, VARS as g, type FragmentSpread as h, type Simplify as i, type VarProxy as j, type AnyFieldSelection as k, type Arg as l, type VarRef as m, makeMutation as n, makeQuery as o, makeSubscription as p };
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.0",
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": "^20.19.43",
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": "^8.5.1",
143
+ "tsup": "^9.0.0",
144
144
  "typescript": "^5.9.3",
145
145
  "typescript-eslint": "^8.66.0",
146
- "vitest": "^2.1.9"
146
+ "vitest": "^5.0.5"
147
147
  }
148
148
  }