Skip to content

Commit 1b03121

Browse files
committed
fixing naming collision
1 parent 86939eb commit 1b03121

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

demo/src/autogen/hasura/ts.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -174,23 +174,23 @@ import { RemoveDogsModelByIdDocument } from '../';
174174

175175
// Subscription Fetch ById Helper
176176
//
177-
export type SubscribeToVehicleGraphByIdSubscriptionResult = FetchResult<SubscribeToVehicleGraphByIdSubscription, Record<string, any>, Record<string, any>>;
178-
export type SubscribeToVehicleGraphByIdSubscriptionResultEx = FetchResult<SubscribeToVehicleGraphByIdSubscription & VehicleGraphByIdHelperResultEx, Record<string, any>, Record<string, any>>;
177+
export type SubscribeToVehicleGraphByIdSubscriptionFetchResult = FetchResult<SubscribeToVehicleGraphByIdSubscription, Record<string, any>, Record<string, any>>;
178+
export type SubscribeToVehicleGraphByIdSubscriptionFetchResultEx = FetchResult<SubscribeToVehicleGraphByIdSubscription & VehicleGraphByIdHelperResultEx, Record<string, any>, Record<string, any>>;
179179

180-
async function subscribeToVehicleGraphById({ apolloClient, vehicleId, options }: { apolloClient: ApolloClient<object>, vehicleId:string, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToVehicleGraphByIdSubscriptionResultEx>> {
181-
const subscription:Observable<SubscribeToVehicleGraphByIdSubscriptionResult> = apolloClient.subscribe<SubscribeToVehicleGraphByIdSubscription>({ query: SubscribeToVehicleGraphByIdDocument, variables: { vehicleId }, ...options });
180+
async function subscribeToVehicleGraphById({ apolloClient, vehicleId, options }: { apolloClient: ApolloClient<object>, vehicleId:string, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToVehicleGraphByIdSubscriptionFetchResultEx>> {
181+
const subscription:Observable<SubscribeToVehicleGraphByIdSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToVehicleGraphByIdSubscription>({ query: SubscribeToVehicleGraphByIdDocument, variables: { vehicleId }, ...options });
182182

183183
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, vehicleGraph:value?.data?.vehicle_by_pk || [] } as SubscribeToVehicleGraphByIdSubscriptionResultEx }) ;
184184
}
185185

186186

187187
// Subscription Fetch Objects Helper
188188
//
189-
export type SubscribeToVehicleGraphObjectsSubscriptionResult = FetchResult<SubscribeToVehicleGraphObjectsSubscription, Record<string, any>, Record<string, any>>;
190-
export type SubscribeToVehicleGraphObjectsSubscriptionResultEx = FetchResult<SubscribeToVehicleGraphObjectsSubscription & VehicleGraphObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
189+
export type SubscribeToVehicleGraphObjectsSubscriptionFetchResult = FetchResult<SubscribeToVehicleGraphObjectsSubscription, Record<string, any>, Record<string, any>>;
190+
export type SubscribeToVehicleGraphObjectsSubscriptionFetchResultEx = FetchResult<SubscribeToVehicleGraphObjectsSubscription & VehicleGraphObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
191191

192-
async function subscribeToVehicleGraphObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToVehicleGraphObjectsSubscriptionResultEx>> {
193-
const subscription:Observable<SubscribeToVehicleGraphObjectsSubscriptionResult> = apolloClient.subscribe<SubscribeToVehicleGraphObjectsSubscription>({ query: SubscribeToVehicleGraphObjectsDocument, ...options });
192+
async function subscribeToVehicleGraphObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToVehicleGraphObjectsSubscriptionFetchResultEx>> {
193+
const subscription:Observable<SubscribeToVehicleGraphObjectsSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToVehicleGraphObjectsSubscription>({ query: SubscribeToVehicleGraphObjectsDocument, ...options });
194194

195195
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, objects: value?.data?.vehicle || [] } as SubscribeToVehicleGraphObjectsSubscriptionResultEx }) ;
196196
}
@@ -404,23 +404,23 @@ import { RemoveDogsModelByIdDocument } from '../';
404404

405405
// Subscription Fetch ById Helper
406406
//
407-
export type SubscribeToVehicleGraphLocationOnlyByIdSubscriptionResult = FetchResult<SubscribeToVehicleGraphLocationOnlyByIdSubscription, Record<string, any>, Record<string, any>>;
408-
export type SubscribeToVehicleGraphLocationOnlyByIdSubscriptionResultEx = FetchResult<SubscribeToVehicleGraphLocationOnlyByIdSubscription & VehicleGraphLocationOnlyByIdHelperResultEx, Record<string, any>, Record<string, any>>;
407+
export type SubscribeToVehicleGraphLocationOnlyByIdSubscriptionFetchResult = FetchResult<SubscribeToVehicleGraphLocationOnlyByIdSubscription, Record<string, any>, Record<string, any>>;
408+
export type SubscribeToVehicleGraphLocationOnlyByIdSubscriptionFetchResultEx = FetchResult<SubscribeToVehicleGraphLocationOnlyByIdSubscription & VehicleGraphLocationOnlyByIdHelperResultEx, Record<string, any>, Record<string, any>>;
409409

410-
async function subscribeToVehicleGraphLocationOnlyById({ apolloClient, vehicleId, options }: { apolloClient: ApolloClient<object>, vehicleId:string, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionResultEx>> {
411-
const subscription:Observable<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionResult> = apolloClient.subscribe<SubscribeToVehicleGraphLocationOnlyByIdSubscription>({ query: SubscribeToVehicleGraphLocationOnlyByIdDocument, variables: { vehicleId }, ...options });
410+
async function subscribeToVehicleGraphLocationOnlyById({ apolloClient, vehicleId, options }: { apolloClient: ApolloClient<object>, vehicleId:string, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionFetchResultEx>> {
411+
const subscription:Observable<SubscribeToVehicleGraphLocationOnlyByIdSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToVehicleGraphLocationOnlyByIdSubscription>({ query: SubscribeToVehicleGraphLocationOnlyByIdDocument, variables: { vehicleId }, ...options });
412412

413413
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, vehicleGraphLocationOnly:value?.data?.vehicle_by_pk || [] } as SubscribeToVehicleGraphLocationOnlyByIdSubscriptionResultEx }) ;
414414
}
415415

416416

417417
// Subscription Fetch Objects Helper
418418
//
419-
export type SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionResult = FetchResult<SubscribeToVehicleGraphLocationOnlyObjectsSubscription, Record<string, any>, Record<string, any>>;
420-
export type SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionResultEx = FetchResult<SubscribeToVehicleGraphLocationOnlyObjectsSubscription & VehicleGraphLocationOnlyObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
419+
export type SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionFetchResult = FetchResult<SubscribeToVehicleGraphLocationOnlyObjectsSubscription, Record<string, any>, Record<string, any>>;
420+
export type SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionFetchResultEx = FetchResult<SubscribeToVehicleGraphLocationOnlyObjectsSubscription & VehicleGraphLocationOnlyObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
421421

422-
async function subscribeToVehicleGraphLocationOnlyObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionResultEx>> {
423-
const subscription:Observable<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionResult> = apolloClient.subscribe<SubscribeToVehicleGraphLocationOnlyObjectsSubscription>({ query: SubscribeToVehicleGraphLocationOnlyObjectsDocument, ...options });
422+
async function subscribeToVehicleGraphLocationOnlyObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionFetchResultEx>> {
423+
const subscription:Observable<SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToVehicleGraphLocationOnlyObjectsSubscription>({ query: SubscribeToVehicleGraphLocationOnlyObjectsDocument, ...options });
424424

425425
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, objects: value?.data?.vehicle || [] } as SubscribeToVehicleGraphLocationOnlyObjectsSubscriptionResultEx }) ;
426426
}
@@ -597,23 +597,23 @@ import { RemoveDogsModelByIdDocument } from '../';
597597

598598
// Subscription Fetch ById Helper
599599
//
600-
export type SubscribeToDogModelByIdSubscriptionResult = FetchResult<SubscribeToDogModelByIdSubscription, Record<string, any>, Record<string, any>>;
601-
export type SubscribeToDogModelByIdSubscriptionResultEx = FetchResult<SubscribeToDogModelByIdSubscription & DogModelByIdHelperResultEx, Record<string, any>, Record<string, any>>;
600+
export type SubscribeToDogModelByIdSubscriptionFetchResult = FetchResult<SubscribeToDogModelByIdSubscription, Record<string, any>, Record<string, any>>;
601+
export type SubscribeToDogModelByIdSubscriptionFetchResultEx = FetchResult<SubscribeToDogModelByIdSubscription & DogModelByIdHelperResultEx, Record<string, any>, Record<string, any>>;
602602

603-
async function subscribeToDogModelById({ apolloClient, dogsId, options }: { apolloClient: ApolloClient<object>, dogsId:string, options: Omit<SubscriptionOptions<SubscribeToDogModelByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToDogModelByIdSubscriptionResultEx>> {
604-
const subscription:Observable<SubscribeToDogModelByIdSubscriptionResult> = apolloClient.subscribe<SubscribeToDogModelByIdSubscription>({ query: SubscribeToDogModelByIdDocument, variables: { dogsId }, ...options });
603+
async function subscribeToDogModelById({ apolloClient, dogsId, options }: { apolloClient: ApolloClient<object>, dogsId:string, options: Omit<SubscriptionOptions<SubscribeToDogModelByIdSubscriptionVariables>, 'query' | 'variables'> }): Promise<Observable<SubscribeToDogModelByIdSubscriptionFetchResultEx>> {
604+
const subscription:Observable<SubscribeToDogModelByIdSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToDogModelByIdSubscription>({ query: SubscribeToDogModelByIdDocument, variables: { dogsId }, ...options });
605605

606606
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, dogModel:value?.data?.dogs_by_pk || [] } as SubscribeToDogModelByIdSubscriptionResultEx }) ;
607607
}
608608

609609

610610
// Subscription Fetch Objects Helper
611611
//
612-
export type SubscribeToDogModelObjectsSubscriptionResult = FetchResult<SubscribeToDogModelObjectsSubscription, Record<string, any>, Record<string, any>>;
613-
export type SubscribeToDogModelObjectsSubscriptionResultEx = FetchResult<SubscribeToDogModelObjectsSubscription & DogModelObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
612+
export type SubscribeToDogModelObjectsSubscriptionFetchResult = FetchResult<SubscribeToDogModelObjectsSubscription, Record<string, any>, Record<string, any>>;
613+
export type SubscribeToDogModelObjectsSubscriptionFetchResultEx = FetchResult<SubscribeToDogModelObjectsSubscription & DogModelObjectsHelperResultEx, Record<string, any>, Record<string, any>>;
614614

615-
async function subscribeToDogModelObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToDogModelObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToDogModelObjectsSubscriptionResultEx>> {
616-
const subscription:Observable<SubscribeToDogModelObjectsSubscriptionResult> = apolloClient.subscribe<SubscribeToDogModelObjectsSubscription>({ query: SubscribeToDogModelObjectsDocument, ...options });
615+
async function subscribeToDogModelObjects({ apolloClient, options }: { apolloClient: ApolloClient<object>, options: Omit<SubscriptionOptions<SubscribeToDogModelObjectsSubscriptionVariables>, 'subscription'> }): Promise<Observable<SubscribeToDogModelObjectsSubscriptionFetchResultEx>> {
616+
const subscription:Observable<SubscribeToDogModelObjectsSubscriptionFetchResult> = apolloClient.subscribe<SubscribeToDogModelObjectsSubscription>({ query: SubscribeToDogModelObjectsDocument, ...options });
617617

618618
return subscription.map(value => {return { context:value.context, errors:value.errors, data:value.data, extensions:value.extensions, objects: value?.data?.dogs || [] } as SubscribeToDogModelObjectsSubscriptionResultEx }) ;
619619
}

packages/graphql-codegen-hasura-shared/dist/src/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-codegen-hasura-shared",
3-
"version": "3.8.2-alpha.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "GraphQL Code Generator plugin for generating a CRUD TypeScript Config for Hasura from Documents",
55
"author": "ahrnee <ahrndee@gmail.com>",
66
"license": "MIT",
@@ -35,5 +35,5 @@
3535
"typescript": {
3636
"definition": "dist/graphql-codegen-hasura-client-config/src/index.d.ts"
3737
},
38-
"gitHead": "44774b82cab3cd633350622a6641debc83a9fa30"
38+
"gitHead": "86939eb1e105504606a19fcf432f09d2e0d95341"
3939
}

packages/graphql-codegen-hasura-shared/dist/src/tshelperInjectors.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)