From ca77d656dfda192ff768b288e4d390a6d2a37322 Mon Sep 17 00:00:00 2001 From: aexol Date: Thu, 9 May 2024 10:09:39 +0200 Subject: [PATCH] fix bug scalars --- examples/typescript-node/package.json | 2 +- examples/typescript-node/src/zeus/const.ts | 76 ++--- examples/typescript-node/src/zeus/index.ts | 302 +++++++++--------- examples/typescript-node/zeus.graphql | 96 +++--- .../TreeToTS/functions/generated.ts | 4 +- .../TreeToTS/functions/new/clientFunctions.ts | 4 +- packages/graphql-zeus-core/package.json | 2 +- packages/graphql-zeus-jsonschema/package.json | 2 +- packages/graphql-zeus/package.json | 6 +- 9 files changed, 247 insertions(+), 247 deletions(-) diff --git a/examples/typescript-node/package.json b/examples/typescript-node/package.json index aa36265..1e215c6 100644 --- a/examples/typescript-node/package.json +++ b/examples/typescript-node/package.json @@ -1,6 +1,6 @@ { "name": "typescript-node", - "version": "1.2.1", + "version": "1.2.2", "description": "", "private": true, "main": "index.js", diff --git a/examples/typescript-node/src/zeus/const.ts b/examples/typescript-node/src/zeus/const.ts index 270a015..347df0a 100644 --- a/examples/typescript-node/src/zeus/const.ts +++ b/examples/typescript-node/src/zeus/const.ts @@ -1,13 +1,17 @@ /* eslint-disable */ export const AllTypesProps: Record = { - Public:{ - powerups:{ + SpecialSkills: "enum" as const, + Query:{ + cardById:{ } }, - Query:{ - cardById:{ + createCard:{ + skills:"SpecialSkills" + }, + Card:{ + attack:{ } }, @@ -17,27 +21,20 @@ export const AllTypesProps: Record = { } }, JSON: `scalar.JSON` as const, - createCard:{ - skills:"SpecialSkills" - }, - Card:{ - attack:{ + Public:{ + powerups:{ } - }, - SpecialSkills: "enum" as const + } } export const ReturnTypes: Record = { - Public:{ - powerups:"Powerup" - }, - ChangeCard:{ - "...on SpecialCard":"SpecialCard", - "...on EffectCard":"EffectCard" - }, - Subscription:{ - deck:"Card" + Nameable:{ + "...on CardStack": "CardStack", + "...on Card": "Card", + "...on SpecialCard": "SpecialCard", + "...on EffectCard": "EffectCard", + name:"String" }, Query:{ cardById:"Card", @@ -48,12 +45,8 @@ export const ReturnTypes: Record = { nameables:"Nameable", public:"Public" }, - Mutation:{ - addCard:"Card" - }, - JSON: `scalar.JSON` as const, - EffectCard:{ - effectSize:"Float", + CardStack:{ + cards:"Card", name:"String" }, Card:{ @@ -69,28 +62,35 @@ export const ReturnTypes: Record = { name:"String", skills:"SpecialSkills" }, - Nameable:{ - "...on EffectCard": "EffectCard", - "...on Card": "Card", - "...on SpecialCard": "SpecialCard", - "...on CardStack": "CardStack", + SpecialCard:{ + effect:"String", name:"String" }, + EffectCard:{ + effectSize:"Float", + name:"String" + }, + Mutation:{ + addCard:"Card" + }, + JSON: `scalar.JSON` as const, S3Object:{ bucket:"String", key:"String", region:"String" }, - SpecialCard:{ - effect:"String", - name:"String" - }, - CardStack:{ - cards:"Card", - name:"String" + Public:{ + powerups:"Powerup" }, Powerup:{ name:"String" + }, + ChangeCard:{ + "...on SpecialCard":"SpecialCard", + "...on EffectCard":"EffectCard" + }, + Subscription:{ + deck:"Card" } } diff --git a/examples/typescript-node/src/zeus/index.ts b/examples/typescript-node/src/zeus/index.ts index fa6527b..1f9fdd8 100644 --- a/examples/typescript-node/src/zeus/index.ts +++ b/examples/typescript-node/src/zeus/index.ts @@ -162,7 +162,7 @@ type UnionOverrideKeys = Omit & U; export const Thunder = (fn: FetchFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => @@ -201,7 +201,7 @@ export const Chain = (...options: chainOptions) => Thunder(apiFetch(options)); export const SubscriptionThunder = (fn: SubscriptionFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => @@ -866,18 +866,15 @@ export type ScalarCoders = { type ZEUS_UNIONS = GraphQLTypes["ChangeCard"] export type ValueTypes = { - ["Public"]: AliasType<{ -powerups?: [{ filter: string | Variable},ValueTypes["Powerup"]], - __typename?: boolean | `@${string}` -}>; - ["ChangeCard"]: AliasType<{ ["...on SpecialCard"] : ValueTypes["SpecialCard"], - ["...on EffectCard"] : ValueTypes["EffectCard"] - __typename?: boolean | `@${string}` -}>; - ["Subscription"]: AliasType<{ - deck?:ValueTypes["Card"], + ["Nameable"]:AliasType<{ + name?:boolean | `@${string}`; + ['...on CardStack']?: Omit; + ['...on Card']?: Omit; + ['...on SpecialCard']?: Omit; + ['...on EffectCard']?: Omit; __typename?: boolean | `@${string}` }>; + ["SpecialSkills"]:SpecialSkills; ["Query"]: AliasType<{ cardById?: [{ cardId?: string | undefined | null | Variable},ValueTypes["Card"]], /** Draw a card
*/ @@ -889,19 +886,11 @@ cardById?: [{ cardId?: string | undefined | null | Variable},ValueT nameables?:ValueTypes["Nameable"], public?:ValueTypes["Public"], __typename?: boolean | `@${string}` -}>; - ["Mutation"]: AliasType<{ -addCard?: [{ card: ValueTypes["createCard"] | Variable},ValueTypes["Card"]], - __typename?: boolean | `@${string}` -}>; - ["JSON"]:unknown; - ["EffectCard"]: AliasType<{ - effectSize?:boolean | `@${string}`, - name?:boolean | `@${string}`, - __typename?: boolean | `@${string}` }>; /** create card inputs
*/ ["createCard"]: { + /** The name of a card
*/ + name: string | Variable, /** Description of a card
*/ description: string | Variable, /**
How many children the greek god had
*/ @@ -911,10 +900,14 @@ addCard?: [{ card: ValueTypes["createCard"] | Variable},ValueTypes[ /** The defense power
*/ Defense: number | Variable, /** input skills */ - skills?: Array | undefined | null | Variable, - /** The name of a card
*/ - name: string | Variable + skills?: Array | undefined | null | Variable }; + /** Stack of cards */ +["CardStack"]: AliasType<{ + cards?:ValueTypes["Card"], + name?:boolean | `@${string}`, + __typename?: boolean | `@${string}` +}>; /** Card used in card game
*/ ["Card"]: AliasType<{ /** The attack power
*/ @@ -937,15 +930,21 @@ attack?: [{ /** Attacked card/card ids
*/ skills?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["SpecialSkills"]:SpecialSkills; - ["Nameable"]:AliasType<{ - name?:boolean | `@${string}`; - ['...on EffectCard']?: Omit; - ['...on Card']?: Omit; - ['...on SpecialCard']?: Omit; - ['...on CardStack']?: Omit; + ["SpecialCard"]: AliasType<{ + effect?:boolean | `@${string}`, + name?:boolean | `@${string}`, + __typename?: boolean | `@${string}` +}>; + ["EffectCard"]: AliasType<{ + effectSize?:boolean | `@${string}`, + name?:boolean | `@${string}`, + __typename?: boolean | `@${string}` +}>; + ["Mutation"]: AliasType<{ +addCard?: [{ card: ValueTypes["createCard"] | Variable},ValueTypes["Card"]], __typename?: boolean | `@${string}` }>; + ["JSON"]:unknown; /** Aws S3 File */ ["S3Object"]: AliasType<{ bucket?:boolean | `@${string}`, @@ -953,37 +952,34 @@ attack?: [{ /** Attacked card/card ids
*/ region?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["SpecialCard"]: AliasType<{ - effect?:boolean | `@${string}`, - name?:boolean | `@${string}`, + ["Public"]: AliasType<{ +powerups?: [{ filter: string | Variable},ValueTypes["Powerup"]], __typename?: boolean | `@${string}` }>; - /** Stack of cards */ -["CardStack"]: AliasType<{ - cards?:ValueTypes["Card"], + ["Powerup"]: AliasType<{ name?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["Powerup"]: AliasType<{ - name?:boolean | `@${string}`, + ["ChangeCard"]: AliasType<{ ["...on SpecialCard"] : ValueTypes["SpecialCard"], + ["...on EffectCard"] : ValueTypes["EffectCard"] + __typename?: boolean | `@${string}` +}>; + ["Subscription"]: AliasType<{ + deck?:ValueTypes["Card"], __typename?: boolean | `@${string}` }> } export type ResolverInputTypes = { - ["Public"]: AliasType<{ -powerups?: [{ filter: string},ResolverInputTypes["Powerup"]], - __typename?: boolean | `@${string}` -}>; - ["ChangeCard"]: AliasType<{ - SpecialCard?:ResolverInputTypes["SpecialCard"], - EffectCard?:ResolverInputTypes["EffectCard"], - __typename?: boolean | `@${string}` -}>; - ["Subscription"]: AliasType<{ - deck?:ResolverInputTypes["Card"], + ["Nameable"]:AliasType<{ + name?:boolean | `@${string}`; + ['...on CardStack']?: Omit; + ['...on Card']?: Omit; + ['...on SpecialCard']?: Omit; + ['...on EffectCard']?: Omit; __typename?: boolean | `@${string}` }>; + ["SpecialSkills"]:SpecialSkills; ["Query"]: AliasType<{ cardById?: [{ cardId?: string | undefined | null},ResolverInputTypes["Card"]], /** Draw a card
*/ @@ -995,19 +991,11 @@ cardById?: [{ cardId?: string | undefined | null},ResolverInputTypes["Card"]], nameables?:ResolverInputTypes["Nameable"], public?:ResolverInputTypes["Public"], __typename?: boolean | `@${string}` -}>; - ["Mutation"]: AliasType<{ -addCard?: [{ card: ResolverInputTypes["createCard"]},ResolverInputTypes["Card"]], - __typename?: boolean | `@${string}` -}>; - ["JSON"]:unknown; - ["EffectCard"]: AliasType<{ - effectSize?:boolean | `@${string}`, - name?:boolean | `@${string}`, - __typename?: boolean | `@${string}` }>; /** create card inputs
*/ ["createCard"]: { + /** The name of a card
*/ + name: string, /** Description of a card
*/ description: string, /**
How many children the greek god had
*/ @@ -1017,10 +1005,14 @@ addCard?: [{ card: ResolverInputTypes["createCard"]},ResolverInputTypes["Card"]] /** The defense power
*/ Defense: number, /** input skills */ - skills?: Array | undefined | null, - /** The name of a card
*/ - name: string + skills?: Array | undefined | null }; + /** Stack of cards */ +["CardStack"]: AliasType<{ + cards?:ResolverInputTypes["Card"], + name?:boolean | `@${string}`, + __typename?: boolean | `@${string}` +}>; /** Card used in card game
*/ ["Card"]: AliasType<{ /** The attack power
*/ @@ -1043,15 +1035,21 @@ attack?: [{ /** Attacked card/card ids
*/ skills?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["SpecialSkills"]:SpecialSkills; - ["Nameable"]:AliasType<{ - name?:boolean | `@${string}`; - ['...on EffectCard']?: Omit; - ['...on Card']?: Omit; - ['...on SpecialCard']?: Omit; - ['...on CardStack']?: Omit; + ["SpecialCard"]: AliasType<{ + effect?:boolean | `@${string}`, + name?:boolean | `@${string}`, + __typename?: boolean | `@${string}` +}>; + ["EffectCard"]: AliasType<{ + effectSize?:boolean | `@${string}`, + name?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; + ["Mutation"]: AliasType<{ +addCard?: [{ card: ResolverInputTypes["createCard"]},ResolverInputTypes["Card"]], + __typename?: boolean | `@${string}` +}>; + ["JSON"]:unknown; /** Aws S3 File */ ["S3Object"]: AliasType<{ bucket?:boolean | `@${string}`, @@ -1059,19 +1057,21 @@ attack?: [{ /** Attacked card/card ids
*/ region?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["SpecialCard"]: AliasType<{ - effect?:boolean | `@${string}`, - name?:boolean | `@${string}`, + ["Public"]: AliasType<{ +powerups?: [{ filter: string},ResolverInputTypes["Powerup"]], __typename?: boolean | `@${string}` }>; - /** Stack of cards */ -["CardStack"]: AliasType<{ - cards?:ResolverInputTypes["Card"], + ["Powerup"]: AliasType<{ name?:boolean | `@${string}`, __typename?: boolean | `@${string}` }>; - ["Powerup"]: AliasType<{ - name?:boolean | `@${string}`, + ["ChangeCard"]: AliasType<{ + SpecialCard?:ResolverInputTypes["SpecialCard"], + EffectCard?:ResolverInputTypes["EffectCard"], + __typename?: boolean | `@${string}` +}>; + ["Subscription"]: AliasType<{ + deck?:ResolverInputTypes["Card"], __typename?: boolean | `@${string}` }>; ["schema"]: AliasType<{ @@ -1083,13 +1083,8 @@ attack?: [{ /** Attacked card/card ids
*/ } export type ModelTypes = { - ["Public"]: { - powerups?: Array | undefined -}; - ["ChangeCard"]:ModelTypes["SpecialCard"] | ModelTypes["EffectCard"]; - ["Subscription"]: { - deck?: Array | undefined -}; + ["Nameable"]: ModelTypes["CardStack"] | ModelTypes["Card"] | ModelTypes["SpecialCard"] | ModelTypes["EffectCard"]; + ["SpecialSkills"]:SpecialSkills; ["Query"]: { cardById?: ModelTypes["Card"] | undefined, /** Draw a card
*/ @@ -1100,18 +1095,11 @@ export type ModelTypes = { myStacks?: Array | undefined, nameables: Array, public?: ModelTypes["Public"] | undefined -}; - ["Mutation"]: { - /** add Card to Cards database
*/ - addCard: ModelTypes["Card"] -}; - ["JSON"]:any; - ["EffectCard"]: { - effectSize: number, - name: string }; /** create card inputs
*/ ["createCard"]: { + /** The name of a card
*/ + name: string, /** Description of a card
*/ description: string, /**
How many children the greek god had
*/ @@ -1121,8 +1109,11 @@ export type ModelTypes = { /** The defense power
*/ Defense: number, /** input skills */ - skills?: Array | undefined, - /** The name of a card
*/ + skills?: Array | undefined +}; + /** Stack of cards */ +["CardStack"]: { + cards?: Array | undefined, name: string }; /** Card used in card game
*/ @@ -1146,25 +1137,34 @@ export type ModelTypes = { name: string, skills?: Array | undefined }; - ["SpecialSkills"]:SpecialSkills; - ["Nameable"]: ModelTypes["EffectCard"] | ModelTypes["Card"] | ModelTypes["SpecialCard"] | ModelTypes["CardStack"]; + ["SpecialCard"]: { + effect: string, + name: string +}; + ["EffectCard"]: { + effectSize: number, + name: string +}; + ["Mutation"]: { + /** add Card to Cards database
*/ + addCard: ModelTypes["Card"] +}; + ["JSON"]:any; /** Aws S3 File */ ["S3Object"]: { bucket: string, key: string, region: string }; - ["SpecialCard"]: { - effect: string, - name: string -}; - /** Stack of cards */ -["CardStack"]: { - cards?: Array | undefined, - name: string + ["Public"]: { + powerups?: Array | undefined }; ["Powerup"]: { name?: string | undefined +}; + ["ChangeCard"]:ModelTypes["SpecialCard"] | ModelTypes["EffectCard"]; + ["Subscription"]: { + deck?: Array | undefined }; ["schema"]: { query?: ModelTypes["Query"] | undefined, @@ -1174,19 +1174,15 @@ export type ModelTypes = { } export type GraphQLTypes = { - ["Public"]: { - __typename: "Public", - powerups?: Array | undefined -}; - ["ChangeCard"]:{ - __typename:"SpecialCard" | "EffectCard" - ['...on SpecialCard']: '__union' & GraphQLTypes["SpecialCard"]; + ["Nameable"]: { + __typename:"CardStack" | "Card" | "SpecialCard" | "EffectCard", + name: string + ['...on CardStack']: '__union' & GraphQLTypes["CardStack"]; + ['...on Card']: '__union' & GraphQLTypes["Card"]; + ['...on SpecialCard']: '__union' & GraphQLTypes["SpecialCard"]; ['...on EffectCard']: '__union' & GraphQLTypes["EffectCard"]; }; - ["Subscription"]: { - __typename: "Subscription", - deck?: Array | undefined -}; + ["SpecialSkills"]: SpecialSkills; ["Query"]: { __typename: "Query", cardById?: GraphQLTypes["Card"] | undefined, @@ -1198,21 +1194,12 @@ export type GraphQLTypes = { myStacks?: Array | undefined, nameables: Array, public?: GraphQLTypes["Public"] | undefined -}; - ["Mutation"]: { - __typename: "Mutation", - /** add Card to Cards database
*/ - addCard: GraphQLTypes["Card"] -}; - ["JSON"]: "scalar" & { name: "JSON" }; - ["EffectCard"]: { - __typename: "EffectCard", - effectSize: number, - name: string }; /** create card inputs
*/ ["createCard"]: { - /** Description of a card
*/ + /** The name of a card
*/ + name: string, + /** Description of a card
*/ description: string, /**
How many children the greek god had
*/ Children?: number | undefined, @@ -1221,8 +1208,12 @@ export type GraphQLTypes = { /** The defense power
*/ Defense: number, /** input skills */ - skills?: Array | undefined, - /** The name of a card
*/ + skills?: Array | undefined +}; + /** Stack of cards */ +["CardStack"]: { + __typename: "CardStack", + cards?: Array | undefined, name: string }; /** Card used in card game
*/ @@ -1247,15 +1238,22 @@ export type GraphQLTypes = { name: string, skills?: Array | undefined }; - ["SpecialSkills"]: SpecialSkills; - ["Nameable"]: { - __typename:"EffectCard" | "Card" | "SpecialCard" | "CardStack", + ["SpecialCard"]: { + __typename: "SpecialCard", + effect: string, name: string - ['...on EffectCard']: '__union' & GraphQLTypes["EffectCard"]; - ['...on Card']: '__union' & GraphQLTypes["Card"]; - ['...on SpecialCard']: '__union' & GraphQLTypes["SpecialCard"]; - ['...on CardStack']: '__union' & GraphQLTypes["CardStack"]; }; + ["EffectCard"]: { + __typename: "EffectCard", + effectSize: number, + name: string +}; + ["Mutation"]: { + __typename: "Mutation", + /** add Card to Cards database
*/ + addCard: GraphQLTypes["Card"] +}; + ["JSON"]: "scalar" & { name: "JSON" }; /** Aws S3 File */ ["S3Object"]: { __typename: "S3Object", @@ -1263,20 +1261,22 @@ export type GraphQLTypes = { key: string, region: string }; - ["SpecialCard"]: { - __typename: "SpecialCard", - effect: string, - name: string -}; - /** Stack of cards */ -["CardStack"]: { - __typename: "CardStack", - cards?: Array | undefined, - name: string + ["Public"]: { + __typename: "Public", + powerups?: Array | undefined }; ["Powerup"]: { __typename: "Powerup", name?: string | undefined +}; + ["ChangeCard"]:{ + __typename:"SpecialCard" | "EffectCard" + ['...on SpecialCard']: '__union' & GraphQLTypes["SpecialCard"]; + ['...on EffectCard']: '__union' & GraphQLTypes["EffectCard"]; +}; + ["Subscription"]: { + __typename: "Subscription", + deck?: Array | undefined } } export const enum SpecialSkills { @@ -1286,7 +1286,7 @@ export const enum SpecialSkills { } type ZEUS_VARIABLES = { - ["JSON"]: ValueTypes["JSON"]; - ["createCard"]: ValueTypes["createCard"]; ["SpecialSkills"]: ValueTypes["SpecialSkills"]; + ["createCard"]: ValueTypes["createCard"]; + ["JSON"]: ValueTypes["JSON"]; } \ No newline at end of file diff --git a/examples/typescript-node/zeus.graphql b/examples/typescript-node/zeus.graphql index d416055..f71ae77 100644 --- a/examples/typescript-node/zeus.graphql +++ b/examples/typescript-node/zeus.graphql @@ -1,16 +1,19 @@ """""" -type Public { +interface Nameable { """""" - powerups(filter: String!): [Powerup!] + name: String! } """""" -union ChangeCard = SpecialCard | EffectCard +enum SpecialSkills { + """Lower enemy defense -5
""" + THUNDER -"""""" -type Subscription { - """""" - deck: [Card!] + """Attack multiple Cards at once
""" + RAIN + + """50% chance to avoid any attack
""" + FIRE } """""" @@ -37,26 +40,11 @@ type Query { public: Public } -"""""" -type Mutation { - """add Card to Cards database
""" - addCard(card: createCard!): Card! -} - -"""""" -scalar JSON - -"""""" -type EffectCard implements Nameable { - """""" - effectSize: Float! - - """""" - name: String! -} - """create card inputs
""" input createCard { + """The name of a card
""" + name: String! + """Description of a card
""" description: String! @@ -71,8 +59,14 @@ input createCard { """input skills""" skills: [SpecialSkills!] +} - """The name of a card
""" +"""Stack of cards""" +type CardStack implements Nameable { + """""" + cards: [Card!] + + """""" name: String! } @@ -116,23 +110,32 @@ type Card implements Nameable { } """""" -enum SpecialSkills { - """Lower enemy defense -5
""" - THUNDER - - """Attack multiple Cards at once
""" - RAIN +type SpecialCard implements Nameable { + """""" + effect: String! - """50% chance to avoid any attack
""" - FIRE + """""" + name: String! } """""" -interface Nameable { +type EffectCard implements Nameable { + """""" + effectSize: Float! + """""" name: String! } +"""""" +type Mutation { + """add Card to Cards database
""" + addCard(card: createCard!): Card! +} + +"""""" +scalar JSON + """Aws S3 File""" type S3Object { """""" @@ -146,27 +149,24 @@ type S3Object { } """""" -type SpecialCard implements Nameable { - """""" - effect: String! - +type Public { """""" - name: String! + powerups(filter: String!): [Powerup!] } -"""Stack of cards""" -type CardStack implements Nameable { - """""" - cards: [Card!] - +"""""" +type Powerup { """""" - name: String! + name: String } """""" -type Powerup { +union ChangeCard = SpecialCard | EffectCard + +"""""" +type Subscription { """""" - name: String + deck: [Card!] } schema{ query: Query, diff --git a/packages/graphql-zeus-core/TreeToTS/functions/generated.ts b/packages/graphql-zeus-core/TreeToTS/functions/generated.ts index b5bb07d..df671b3 100644 --- a/packages/graphql-zeus-core/TreeToTS/functions/generated.ts +++ b/packages/graphql-zeus-core/TreeToTS/functions/generated.ts @@ -121,7 +121,7 @@ type UnionOverrideKeys = Omit & U; export const Thunder = (fn: FetchFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => @@ -160,7 +160,7 @@ export const Chain = (...options: chainOptions) => Thunder(apiFetch(options)); export const SubscriptionThunder = (fn: SubscriptionFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => diff --git a/packages/graphql-zeus-core/TreeToTS/functions/new/clientFunctions.ts b/packages/graphql-zeus-core/TreeToTS/functions/new/clientFunctions.ts index bb80371..1931603 100644 --- a/packages/graphql-zeus-core/TreeToTS/functions/new/clientFunctions.ts +++ b/packages/graphql-zeus-core/TreeToTS/functions/new/clientFunctions.ts @@ -28,7 +28,7 @@ type UnionOverrideKeys = Omit & U; export const Thunder = (fn: FetchFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => @@ -67,7 +67,7 @@ export const Chain = (...options: chainOptions) => Thunder(apiFetch(options)); export const SubscriptionThunder = (fn: SubscriptionFunction, thunderGraphQLOptions?: ThunderGraphQLOptions) => - >( + >( operation: O, graphqlOptions?: ThunderGraphQLOptions, ) => diff --git a/packages/graphql-zeus-core/package.json b/packages/graphql-zeus-core/package.json index 1c82c3d..d299b3c 100644 --- a/packages/graphql-zeus-core/package.json +++ b/packages/graphql-zeus-core/package.json @@ -1,6 +1,6 @@ { "name": "graphql-zeus-core", - "version": "5.4.1", + "version": "5.4.2", "private": false, "main": "./lib/index.js", "author": "GraphQL Editor, Artur Czemiel", diff --git a/packages/graphql-zeus-jsonschema/package.json b/packages/graphql-zeus-jsonschema/package.json index 735b8df..bc5ce6c 100644 --- a/packages/graphql-zeus-jsonschema/package.json +++ b/packages/graphql-zeus-jsonschema/package.json @@ -1,6 +1,6 @@ { "name": "graphql-zeus-jsonschema", - "version": "5.4.1", + "version": "5.4.2", "private": false, "main": "./lib/index.js", "author": "GraphQL Editor, Artur Czemiel", diff --git a/packages/graphql-zeus/package.json b/packages/graphql-zeus/package.json index 86ee814..e2ffcdc 100644 --- a/packages/graphql-zeus/package.json +++ b/packages/graphql-zeus/package.json @@ -1,6 +1,6 @@ { "name": "graphql-zeus", - "version": "5.4.1", + "version": "5.4.2", "private": false, "scripts": { "start": "ttsc --watch", @@ -26,8 +26,8 @@ "dependencies": { "config-maker": "^0.0.2", "cross-fetch": "^3.0.4", - "graphql-zeus-core": "^5.4.1", - "graphql-zeus-jsonschema": "^5.4.1", + "graphql-zeus-core": "^5.4.2", + "graphql-zeus-jsonschema": "^5.4.2", "yargs": "^16.1.1" } }