graphql-binding / graphql-static-binding

Generate static binding files for a GraphQL schema
MIT License
24 stars 7 forks source link

Create separate `.d.ts` file for type definitions #6

Open kbrandwijk opened 6 years ago

kbrandwijk commented 6 years ago

For both js and ts generators, putting the type definitions in a separate .d.ts file helps with IDE tooling.

schickling commented 6 years ago

Any idea how this would then work with js-only codebases? What would be the equivalent for the following:

https://github.com/graphql-boilerplates/typescript-graphql-server/blob/master/advanced/src/utils.ts#L2-L7

kbrandwijk commented 6 years ago

Yes, in that case you can't strongly type that context parameter, but setting it on the context would ideally provide IDE intellisense because the .d.ts file is present.

schickling commented 6 years ago

Would would you set the context type then?

kbrandwijk commented 6 years ago

When I use the javascript generated binding file, I still get intellisense support in VS code, even without a typings file (they added that in one of the recent releases). Do you still think this is needed @schickling? image

schickling commented 6 years ago

Is that snippet vanilla JS? I'm wondering how ctx: Context works?

kbrandwijk commented 6 years ago

No, this is the JS binding in a TS project, sorry... I'll retest with a full JS project.

ForsakenHarmony commented 6 years ago

.d.ts files would be very useful

I can use typescript and webstorm recognises it, but it would be nice to just have the definitions

kbrandwijk commented 6 years ago

Creating a separate .d.ts file isn't that difficult, the difficuly comes from the fact that .graphqlconfig only has one output setting. My current idea is to add an optional typings setting to the graphql-config extension (similar to package.json) that, when present, causes it to put the typings in a separate file. @schickling Do you agree with that solution?

schickling commented 6 years ago

@kbrandwijk can you show an example how that would look like?

kbrandwijk commented 6 years ago
extensions:
   prepare-binding:
      output: src/generated/prisma.ts
      typings: src/generated/prisma.d.ts
      generator: prisma-ts

If typings is there, it will create two separate files, otherwise just one. This makes sure it is a non-breaking change, and anyone not changing their config will get the identical output to what they're getting now, which is very important I think.

KATT commented 6 years ago

Heya. I can try to have a stab at it, but unsure where to start, can you give me some pointers?

I want to generate the interfaces separately so they can be shared between clients/server. (https://github.com/KATT/shop/pull/35)

KATT commented 6 years ago

How come prisma bindings didn’t go on using + contributing to like gql2ts underneath instead of writing your own lib for generating ts defs?

Was it considered? It seems well-maintained, well-tested, etc.

gql2ts seems quite mature and generates some pretty sweet defs. I tried it on my `prisma.gql` ```ts // tslint:disable // graphql typescript definitions declare namespace GQL { interface IGraphQLResponseRoot { data?: IQuery | IMutation | ISubscription; errors?: Array; } interface IGraphQLResponseError { /** Required for all errors */ message: string; locations?: Array; /** 7.2.2 says 'GraphQL servers may provide additional entries to error' */ [propName: string]: any; } interface IGraphQLResponseErrorLocation { line: number; column: number; } interface IQuery { __typename: 'Query'; users: Array; brands: Array; products: Array; orders: Array; orderRows: Array; discountCodes: Array; user: IUser | null; brand: IBrand | null; product: IProduct | null; order: IOrder | null; orderRow: IOrderRow | null; discountCode: IDiscountCode | null; usersConnection: IUserConnection; brandsConnection: IBrandConnection; productsConnection: IProductConnection; ordersConnection: IOrderConnection; orderRowsConnection: IOrderRowConnection; discountCodesConnection: IDiscountCodeConnection; /** * Fetches an object given its ID */ node: Node | null; } interface IUsersOnQueryArguments { where?: IUserWhereInput | null; orderBy?: UserOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IBrandsOnQueryArguments { where?: IBrandWhereInput | null; orderBy?: BrandOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IProductsOnQueryArguments { where?: IProductWhereInput | null; orderBy?: ProductOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IOrdersOnQueryArguments { where?: IOrderWhereInput | null; orderBy?: OrderOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IOrderRowsOnQueryArguments { where?: IOrderRowWhereInput | null; orderBy?: OrderRowOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IDiscountCodesOnQueryArguments { where?: IDiscountCodeWhereInput | null; orderBy?: DiscountCodeOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IUserOnQueryArguments { where: IUserWhereUniqueInput; } interface IBrandOnQueryArguments { where: IBrandWhereUniqueInput; } interface IProductOnQueryArguments { where: IProductWhereUniqueInput; } interface IOrderOnQueryArguments { where: IOrderWhereUniqueInput; } interface IOrderRowOnQueryArguments { where: IOrderRowWhereUniqueInput; } interface IDiscountCodeOnQueryArguments { where: IDiscountCodeWhereUniqueInput; } interface IUsersConnectionOnQueryArguments { where?: IUserWhereInput | null; orderBy?: UserOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IBrandsConnectionOnQueryArguments { where?: IBrandWhereInput | null; orderBy?: BrandOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IProductsConnectionOnQueryArguments { where?: IProductWhereInput | null; orderBy?: ProductOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IOrdersConnectionOnQueryArguments { where?: IOrderWhereInput | null; orderBy?: OrderOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IOrderRowsConnectionOnQueryArguments { where?: IOrderRowWhereInput | null; orderBy?: OrderRowOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IDiscountCodesConnectionOnQueryArguments { where?: IDiscountCodeWhereInput | null; orderBy?: DiscountCodeOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface INodeOnQueryArguments { /** * The ID of an object */ id: string; } interface IUserWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; email?: string | null; /** * All values that are not equal to given value. */ email_not?: string | null; /** * All values that are contained in given list. */ email_in: Array; /** * All values that are not contained in given list. */ email_not_in: Array; /** * All values less than the given value. */ email_lt?: string | null; /** * All values less than or equal the given value. */ email_lte?: string | null; /** * All values greater than the given value. */ email_gt?: string | null; /** * All values greater than or equal the given value. */ email_gte?: string | null; /** * All values containing the given string. */ email_contains?: string | null; /** * All values not containing the given string. */ email_not_contains?: string | null; /** * All values starting with the given string. */ email_starts_with?: string | null; /** * All values not starting with the given string. */ email_not_starts_with?: string | null; /** * All values ending with the given string. */ email_ends_with?: string | null; /** * All values not ending with the given string. */ email_not_ends_with?: string | null; password?: string | null; /** * All values that are not equal to given value. */ password_not?: string | null; /** * All values that are contained in given list. */ password_in: Array; /** * All values that are not contained in given list. */ password_not_in: Array; /** * All values less than the given value. */ password_lt?: string | null; /** * All values less than or equal the given value. */ password_lte?: string | null; /** * All values greater than the given value. */ password_gt?: string | null; /** * All values greater than or equal the given value. */ password_gte?: string | null; /** * All values containing the given string. */ password_contains?: string | null; /** * All values not containing the given string. */ password_not_contains?: string | null; /** * All values starting with the given string. */ password_starts_with?: string | null; /** * All values not starting with the given string. */ password_not_starts_with?: string | null; /** * All values ending with the given string. */ password_ends_with?: string | null; /** * All values not ending with the given string. */ password_not_ends_with?: string | null; name?: string | null; /** * All values that are not equal to given value. */ name_not?: string | null; /** * All values that are contained in given list. */ name_in: Array; /** * All values that are not contained in given list. */ name_not_in: Array; /** * All values less than the given value. */ name_lt?: string | null; /** * All values less than or equal the given value. */ name_lte?: string | null; /** * All values greater than the given value. */ name_gt?: string | null; /** * All values greater than or equal the given value. */ name_gte?: string | null; /** * All values containing the given string. */ name_contains?: string | null; /** * All values not containing the given string. */ name_not_contains?: string | null; /** * All values starting with the given string. */ name_starts_with?: string | null; /** * All values not starting with the given string. */ name_not_starts_with?: string | null; /** * All values ending with the given string. */ name_ends_with?: string | null; /** * All values not ending with the given string. */ name_not_ends_with?: string | null; } enum UserOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', email_ASC = 'email_ASC', email_DESC = 'email_DESC', password_ASC = 'password_ASC', password_DESC = 'password_DESC', name_ASC = 'name_ASC', name_DESC = 'name_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', } interface IUser { __typename: 'User'; id: string; email: string; password: string; name: string; } /** * An object with an ID */ type Node = IUser | IBrand | IProduct | IOrder | IOrderRow | IDiscountCode; /** * An object with an ID */ interface INode { __typename: 'Node'; /** * The id of the object. */ id: string; } interface IBrandWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; createdAt?: any | null; /** * All values that are not equal to given value. */ createdAt_not?: any | null; /** * All values that are contained in given list. */ createdAt_in: Array; /** * All values that are not contained in given list. */ createdAt_not_in: Array; /** * All values less than the given value. */ createdAt_lt?: any | null; /** * All values less than or equal the given value. */ createdAt_lte?: any | null; /** * All values greater than the given value. */ createdAt_gt?: any | null; /** * All values greater than or equal the given value. */ createdAt_gte?: any | null; updatedAt?: any | null; /** * All values that are not equal to given value. */ updatedAt_not?: any | null; /** * All values that are contained in given list. */ updatedAt_in: Array; /** * All values that are not contained in given list. */ updatedAt_not_in: Array; /** * All values less than the given value. */ updatedAt_lt?: any | null; /** * All values less than or equal the given value. */ updatedAt_lte?: any | null; /** * All values greater than the given value. */ updatedAt_gt?: any | null; /** * All values greater than or equal the given value. */ updatedAt_gte?: any | null; name?: string | null; /** * All values that are not equal to given value. */ name_not?: string | null; /** * All values that are contained in given list. */ name_in: Array; /** * All values that are not contained in given list. */ name_not_in: Array; /** * All values less than the given value. */ name_lt?: string | null; /** * All values less than or equal the given value. */ name_lte?: string | null; /** * All values greater than the given value. */ name_gt?: string | null; /** * All values greater than or equal the given value. */ name_gte?: string | null; /** * All values containing the given string. */ name_contains?: string | null; /** * All values not containing the given string. */ name_not_contains?: string | null; /** * All values starting with the given string. */ name_starts_with?: string | null; /** * All values not starting with the given string. */ name_not_starts_with?: string | null; /** * All values ending with the given string. */ name_ends_with?: string | null; /** * All values not ending with the given string. */ name_not_ends_with?: string | null; slug?: string | null; /** * All values that are not equal to given value. */ slug_not?: string | null; /** * All values that are contained in given list. */ slug_in: Array; /** * All values that are not contained in given list. */ slug_not_in: Array; /** * All values less than the given value. */ slug_lt?: string | null; /** * All values less than or equal the given value. */ slug_lte?: string | null; /** * All values greater than the given value. */ slug_gt?: string | null; /** * All values greater than or equal the given value. */ slug_gte?: string | null; /** * All values containing the given string. */ slug_contains?: string | null; /** * All values not containing the given string. */ slug_not_contains?: string | null; /** * All values starting with the given string. */ slug_starts_with?: string | null; /** * All values not starting with the given string. */ slug_not_starts_with?: string | null; /** * All values ending with the given string. */ slug_ends_with?: string | null; /** * All values not ending with the given string. */ slug_not_ends_with?: string | null; url?: string | null; /** * All values that are not equal to given value. */ url_not?: string | null; /** * All values that are contained in given list. */ url_in: Array; /** * All values that are not contained in given list. */ url_not_in: Array; /** * All values less than the given value. */ url_lt?: string | null; /** * All values less than or equal the given value. */ url_lte?: string | null; /** * All values greater than the given value. */ url_gt?: string | null; /** * All values greater than or equal the given value. */ url_gte?: string | null; /** * All values containing the given string. */ url_contains?: string | null; /** * All values not containing the given string. */ url_not_contains?: string | null; /** * All values starting with the given string. */ url_starts_with?: string | null; /** * All values not starting with the given string. */ url_not_starts_with?: string | null; /** * All values ending with the given string. */ url_ends_with?: string | null; /** * All values not ending with the given string. */ url_not_ends_with?: string | null; } enum BrandOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', name_ASC = 'name_ASC', name_DESC = 'name_DESC', slug_ASC = 'slug_ASC', slug_DESC = 'slug_DESC', url_ASC = 'url_ASC', url_DESC = 'url_DESC', } interface IBrand { __typename: 'Brand'; id: string; createdAt: any; updatedAt: any; name: string; slug: string; url: string; } interface IProductWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; createdAt?: any | null; /** * All values that are not equal to given value. */ createdAt_not?: any | null; /** * All values that are contained in given list. */ createdAt_in: Array; /** * All values that are not contained in given list. */ createdAt_not_in: Array; /** * All values less than the given value. */ createdAt_lt?: any | null; /** * All values less than or equal the given value. */ createdAt_lte?: any | null; /** * All values greater than the given value. */ createdAt_gt?: any | null; /** * All values greater than or equal the given value. */ createdAt_gte?: any | null; updatedAt?: any | null; /** * All values that are not equal to given value. */ updatedAt_not?: any | null; /** * All values that are contained in given list. */ updatedAt_in: Array; /** * All values that are not contained in given list. */ updatedAt_not_in: Array; /** * All values less than the given value. */ updatedAt_lt?: any | null; /** * All values less than or equal the given value. */ updatedAt_lte?: any | null; /** * All values greater than the given value. */ updatedAt_gt?: any | null; /** * All values greater than or equal the given value. */ updatedAt_gte?: any | null; price?: number | null; /** * All values that are not equal to given value. */ price_not?: number | null; /** * All values that are contained in given list. */ price_in: Array; /** * All values that are not contained in given list. */ price_not_in: Array; /** * All values less than the given value. */ price_lt?: number | null; /** * All values less than or equal the given value. */ price_lte?: number | null; /** * All values greater than the given value. */ price_gt?: number | null; /** * All values greater than or equal the given value. */ price_gte?: number | null; name?: string | null; /** * All values that are not equal to given value. */ name_not?: string | null; /** * All values that are contained in given list. */ name_in: Array; /** * All values that are not contained in given list. */ name_not_in: Array; /** * All values less than the given value. */ name_lt?: string | null; /** * All values less than or equal the given value. */ name_lte?: string | null; /** * All values greater than the given value. */ name_gt?: string | null; /** * All values greater than or equal the given value. */ name_gte?: string | null; /** * All values containing the given string. */ name_contains?: string | null; /** * All values not containing the given string. */ name_not_contains?: string | null; /** * All values starting with the given string. */ name_starts_with?: string | null; /** * All values not starting with the given string. */ name_not_starts_with?: string | null; /** * All values ending with the given string. */ name_ends_with?: string | null; /** * All values not ending with the given string. */ name_not_ends_with?: string | null; slug?: string | null; /** * All values that are not equal to given value. */ slug_not?: string | null; /** * All values that are contained in given list. */ slug_in: Array; /** * All values that are not contained in given list. */ slug_not_in: Array; /** * All values less than the given value. */ slug_lt?: string | null; /** * All values less than or equal the given value. */ slug_lte?: string | null; /** * All values greater than the given value. */ slug_gt?: string | null; /** * All values greater than or equal the given value. */ slug_gte?: string | null; /** * All values containing the given string. */ slug_contains?: string | null; /** * All values not containing the given string. */ slug_not_contains?: string | null; /** * All values starting with the given string. */ slug_starts_with?: string | null; /** * All values not starting with the given string. */ slug_not_starts_with?: string | null; /** * All values ending with the given string. */ slug_ends_with?: string | null; /** * All values not ending with the given string. */ slug_not_ends_with?: string | null; thumbnail?: string | null; /** * All values that are not equal to given value. */ thumbnail_not?: string | null; /** * All values that are contained in given list. */ thumbnail_in: Array; /** * All values that are not contained in given list. */ thumbnail_not_in: Array; /** * All values less than the given value. */ thumbnail_lt?: string | null; /** * All values less than or equal the given value. */ thumbnail_lte?: string | null; /** * All values greater than the given value. */ thumbnail_gt?: string | null; /** * All values greater than or equal the given value. */ thumbnail_gte?: string | null; /** * All values containing the given string. */ thumbnail_contains?: string | null; /** * All values not containing the given string. */ thumbnail_not_contains?: string | null; /** * All values starting with the given string. */ thumbnail_starts_with?: string | null; /** * All values not starting with the given string. */ thumbnail_not_starts_with?: string | null; /** * All values ending with the given string. */ thumbnail_ends_with?: string | null; /** * All values not ending with the given string. */ thumbnail_not_ends_with?: string | null; brand?: IBrandWhereInput | null; } enum ProductOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', price_ASC = 'price_ASC', price_DESC = 'price_DESC', name_ASC = 'name_ASC', name_DESC = 'name_DESC', slug_ASC = 'slug_ASC', slug_DESC = 'slug_DESC', thumbnail_ASC = 'thumbnail_ASC', thumbnail_DESC = 'thumbnail_DESC', } interface IProduct { __typename: 'Product'; id: string; createdAt: any; updatedAt: any; price: number; brand: IBrand; name: string; slug: string; thumbnail: string; } interface IBrandOnProductArguments { where?: IBrandWhereInput | null; } interface IOrderWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; createdAt?: any | null; /** * All values that are not equal to given value. */ createdAt_not?: any | null; /** * All values that are contained in given list. */ createdAt_in: Array; /** * All values that are not contained in given list. */ createdAt_not_in: Array; /** * All values less than the given value. */ createdAt_lt?: any | null; /** * All values less than or equal the given value. */ createdAt_lte?: any | null; /** * All values greater than the given value. */ createdAt_gt?: any | null; /** * All values greater than or equal the given value. */ createdAt_gte?: any | null; updatedAt?: any | null; /** * All values that are not equal to given value. */ updatedAt_not?: any | null; /** * All values that are contained in given list. */ updatedAt_in: Array; /** * All values that are not contained in given list. */ updatedAt_not_in: Array; /** * All values less than the given value. */ updatedAt_lt?: any | null; /** * All values less than or equal the given value. */ updatedAt_lte?: any | null; /** * All values greater than the given value. */ updatedAt_gt?: any | null; /** * All values greater than or equal the given value. */ updatedAt_gte?: any | null; rows_every?: IOrderRowWhereInput | null; rows_some?: IOrderRowWhereInput | null; rows_none?: IOrderRowWhereInput | null; user?: IUserWhereInput | null; discountCodes_every?: IDiscountCodeWhereInput | null; discountCodes_some?: IDiscountCodeWhereInput | null; discountCodes_none?: IDiscountCodeWhereInput | null; } interface IOrderRowWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; createdAt?: any | null; /** * All values that are not equal to given value. */ createdAt_not?: any | null; /** * All values that are contained in given list. */ createdAt_in: Array; /** * All values that are not contained in given list. */ createdAt_not_in: Array; /** * All values less than the given value. */ createdAt_lt?: any | null; /** * All values less than or equal the given value. */ createdAt_lte?: any | null; /** * All values greater than the given value. */ createdAt_gt?: any | null; /** * All values greater than or equal the given value. */ createdAt_gte?: any | null; updatedAt?: any | null; /** * All values that are not equal to given value. */ updatedAt_not?: any | null; /** * All values that are contained in given list. */ updatedAt_in: Array; /** * All values that are not contained in given list. */ updatedAt_not_in: Array; /** * All values less than the given value. */ updatedAt_lt?: any | null; /** * All values less than or equal the given value. */ updatedAt_lte?: any | null; /** * All values greater than the given value. */ updatedAt_gt?: any | null; /** * All values greater than or equal the given value. */ updatedAt_gte?: any | null; quantity?: number | null; /** * All values that are not equal to given value. */ quantity_not?: number | null; /** * All values that are contained in given list. */ quantity_in: Array; /** * All values that are not contained in given list. */ quantity_not_in: Array; /** * All values less than the given value. */ quantity_lt?: number | null; /** * All values less than or equal the given value. */ quantity_lte?: number | null; /** * All values greater than the given value. */ quantity_gt?: number | null; /** * All values greater than or equal the given value. */ quantity_gte?: number | null; product?: IProductWhereInput | null; order?: IOrderWhereInput | null; } interface IDiscountCodeWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; id?: string | null; /** * All values that are not equal to given value. */ id_not?: string | null; /** * All values that are contained in given list. */ id_in: Array; /** * All values that are not contained in given list. */ id_not_in: Array; /** * All values less than the given value. */ id_lt?: string | null; /** * All values less than or equal the given value. */ id_lte?: string | null; /** * All values greater than the given value. */ id_gt?: string | null; /** * All values greater than or equal the given value. */ id_gte?: string | null; /** * All values containing the given string. */ id_contains?: string | null; /** * All values not containing the given string. */ id_not_contains?: string | null; /** * All values starting with the given string. */ id_starts_with?: string | null; /** * All values not starting with the given string. */ id_not_starts_with?: string | null; /** * All values ending with the given string. */ id_ends_with?: string | null; /** * All values not ending with the given string. */ id_not_ends_with?: string | null; createdAt?: any | null; /** * All values that are not equal to given value. */ createdAt_not?: any | null; /** * All values that are contained in given list. */ createdAt_in: Array; /** * All values that are not contained in given list. */ createdAt_not_in: Array; /** * All values less than the given value. */ createdAt_lt?: any | null; /** * All values less than or equal the given value. */ createdAt_lte?: any | null; /** * All values greater than the given value. */ createdAt_gt?: any | null; /** * All values greater than or equal the given value. */ createdAt_gte?: any | null; updatedAt?: any | null; /** * All values that are not equal to given value. */ updatedAt_not?: any | null; /** * All values that are contained in given list. */ updatedAt_in: Array; /** * All values that are not contained in given list. */ updatedAt_not_in: Array; /** * All values less than the given value. */ updatedAt_lt?: any | null; /** * All values less than or equal the given value. */ updatedAt_lte?: any | null; /** * All values greater than the given value. */ updatedAt_gt?: any | null; /** * All values greater than or equal the given value. */ updatedAt_gte?: any | null; code?: string | null; /** * All values that are not equal to given value. */ code_not?: string | null; /** * All values that are contained in given list. */ code_in: Array; /** * All values that are not contained in given list. */ code_not_in: Array; /** * All values less than the given value. */ code_lt?: string | null; /** * All values less than or equal the given value. */ code_lte?: string | null; /** * All values greater than the given value. */ code_gt?: string | null; /** * All values greater than or equal the given value. */ code_gte?: string | null; /** * All values containing the given string. */ code_contains?: string | null; /** * All values not containing the given string. */ code_not_contains?: string | null; /** * All values starting with the given string. */ code_starts_with?: string | null; /** * All values not starting with the given string. */ code_not_starts_with?: string | null; /** * All values ending with the given string. */ code_ends_with?: string | null; /** * All values not ending with the given string. */ code_not_ends_with?: string | null; name?: string | null; /** * All values that are not equal to given value. */ name_not?: string | null; /** * All values that are contained in given list. */ name_in: Array; /** * All values that are not contained in given list. */ name_not_in: Array; /** * All values less than the given value. */ name_lt?: string | null; /** * All values less than or equal the given value. */ name_lte?: string | null; /** * All values greater than the given value. */ name_gt?: string | null; /** * All values greater than or equal the given value. */ name_gte?: string | null; /** * All values containing the given string. */ name_contains?: string | null; /** * All values not containing the given string. */ name_not_contains?: string | null; /** * All values starting with the given string. */ name_starts_with?: string | null; /** * All values not starting with the given string. */ name_not_starts_with?: string | null; /** * All values ending with the given string. */ name_ends_with?: string | null; /** * All values not ending with the given string. */ name_not_ends_with?: string | null; description?: string | null; /** * All values that are not equal to given value. */ description_not?: string | null; /** * All values that are contained in given list. */ description_in: Array; /** * All values that are not contained in given list. */ description_not_in: Array; /** * All values less than the given value. */ description_lt?: string | null; /** * All values less than or equal the given value. */ description_lte?: string | null; /** * All values greater than the given value. */ description_gt?: string | null; /** * All values greater than or equal the given value. */ description_gte?: string | null; /** * All values containing the given string. */ description_contains?: string | null; /** * All values not containing the given string. */ description_not_contains?: string | null; /** * All values starting with the given string. */ description_starts_with?: string | null; /** * All values not starting with the given string. */ description_not_starts_with?: string | null; /** * All values ending with the given string. */ description_ends_with?: string | null; /** * All values not ending with the given string. */ description_not_ends_with?: string | null; type?: DiscountCodeType | null; /** * All values that are not equal to given value. */ type_not?: DiscountCodeType | null; /** * All values that are contained in given list. */ type_in: Array; /** * All values that are not contained in given list. */ type_not_in: Array; amount?: number | null; /** * All values that are not equal to given value. */ amount_not?: number | null; /** * All values that are contained in given list. */ amount_in: Array; /** * All values that are not contained in given list. */ amount_not_in: Array; /** * All values less than the given value. */ amount_lt?: number | null; /** * All values less than or equal the given value. */ amount_lte?: number | null; /** * All values greater than the given value. */ amount_gt?: number | null; /** * All values greater than or equal the given value. */ amount_gte?: number | null; } enum DiscountCodeType { Percentage = 'Percentage', } enum OrderOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', } interface IOrder { __typename: 'Order'; id: string; createdAt: any; updatedAt: any; rows: Array; user: IUser | null; discountCodes: Array; } interface IRowsOnOrderArguments { where?: IOrderRowWhereInput | null; orderBy?: OrderRowOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } interface IUserOnOrderArguments { where?: IUserWhereInput | null; } interface IDiscountCodesOnOrderArguments { where?: IDiscountCodeWhereInput | null; orderBy?: DiscountCodeOrderByInput | null; skip?: number | null; after?: string | null; before?: string | null; first?: number | null; last?: number | null; } enum OrderRowOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', quantity_ASC = 'quantity_ASC', quantity_DESC = 'quantity_DESC', } interface IOrderRow { __typename: 'OrderRow'; id: string; createdAt: any; updatedAt: any; quantity: number; product: IProduct; order: IOrder; } interface IProductOnOrderRowArguments { where?: IProductWhereInput | null; } interface IOrderOnOrderRowArguments { where?: IOrderWhereInput | null; } enum DiscountCodeOrderByInput { id_ASC = 'id_ASC', id_DESC = 'id_DESC', createdAt_ASC = 'createdAt_ASC', createdAt_DESC = 'createdAt_DESC', updatedAt_ASC = 'updatedAt_ASC', updatedAt_DESC = 'updatedAt_DESC', code_ASC = 'code_ASC', code_DESC = 'code_DESC', name_ASC = 'name_ASC', name_DESC = 'name_DESC', description_ASC = 'description_ASC', description_DESC = 'description_DESC', type_ASC = 'type_ASC', type_DESC = 'type_DESC', amount_ASC = 'amount_ASC', amount_DESC = 'amount_DESC', } interface IDiscountCode { __typename: 'DiscountCode'; id: string; createdAt: any; updatedAt: any; code: string; name: string; description: string; type: DiscountCodeType; amount: number; } interface IUserWhereUniqueInput { id?: string | null; email?: string | null; } interface IBrandWhereUniqueInput { id?: string | null; slug?: string | null; } interface IProductWhereUniqueInput { id?: string | null; slug?: string | null; } interface IOrderWhereUniqueInput { id?: string | null; } interface IOrderRowWhereUniqueInput { id?: string | null; } interface IDiscountCodeWhereUniqueInput { id?: string | null; code?: string | null; } /** * A connection to a list of items. */ interface IUserConnection { __typename: 'UserConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateUser; } /** * Information about pagination in a connection. */ interface IPageInfo { __typename: 'PageInfo'; /** * When paginating forwards, are there more items? */ hasNextPage: boolean; /** * When paginating backwards, are there more items? */ hasPreviousPage: boolean; /** * When paginating backwards, the cursor to continue. */ startCursor: string | null; /** * When paginating forwards, the cursor to continue. */ endCursor: string | null; } /** * An edge in a connection. */ interface IUserEdge { __typename: 'UserEdge'; /** * The item at the end of the edge. */ node: IUser; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateUser { __typename: 'AggregateUser'; count: number; } /** * A connection to a list of items. */ interface IBrandConnection { __typename: 'BrandConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateBrand; } /** * An edge in a connection. */ interface IBrandEdge { __typename: 'BrandEdge'; /** * The item at the end of the edge. */ node: IBrand; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateBrand { __typename: 'AggregateBrand'; count: number; } /** * A connection to a list of items. */ interface IProductConnection { __typename: 'ProductConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateProduct; } /** * An edge in a connection. */ interface IProductEdge { __typename: 'ProductEdge'; /** * The item at the end of the edge. */ node: IProduct; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateProduct { __typename: 'AggregateProduct'; count: number; } /** * A connection to a list of items. */ interface IOrderConnection { __typename: 'OrderConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateOrder; } /** * An edge in a connection. */ interface IOrderEdge { __typename: 'OrderEdge'; /** * The item at the end of the edge. */ node: IOrder; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateOrder { __typename: 'AggregateOrder'; count: number; } /** * A connection to a list of items. */ interface IOrderRowConnection { __typename: 'OrderRowConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateOrderRow; } /** * An edge in a connection. */ interface IOrderRowEdge { __typename: 'OrderRowEdge'; /** * The item at the end of the edge. */ node: IOrderRow; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateOrderRow { __typename: 'AggregateOrderRow'; count: number; } /** * A connection to a list of items. */ interface IDiscountCodeConnection { __typename: 'DiscountCodeConnection'; /** * Information to aid in pagination. */ pageInfo: IPageInfo; /** * A list of edges. */ edges: Array; aggregate: IAggregateDiscountCode; } /** * An edge in a connection. */ interface IDiscountCodeEdge { __typename: 'DiscountCodeEdge'; /** * The item at the end of the edge. */ node: IDiscountCode; /** * A cursor for use in pagination. */ cursor: string; } interface IAggregateDiscountCode { __typename: 'AggregateDiscountCode'; count: number; } interface IMutation { __typename: 'Mutation'; createUser: IUser; createBrand: IBrand; createProduct: IProduct; createOrder: IOrder; createOrderRow: IOrderRow; createDiscountCode: IDiscountCode; updateUser: IUser | null; updateBrand: IBrand | null; updateProduct: IProduct | null; updateOrder: IOrder | null; updateOrderRow: IOrderRow | null; updateDiscountCode: IDiscountCode | null; deleteUser: IUser | null; deleteBrand: IBrand | null; deleteProduct: IProduct | null; deleteOrder: IOrder | null; deleteOrderRow: IOrderRow | null; deleteDiscountCode: IDiscountCode | null; upsertUser: IUser; upsertBrand: IBrand; upsertProduct: IProduct; upsertOrder: IOrder; upsertOrderRow: IOrderRow; upsertDiscountCode: IDiscountCode; updateManyUsers: IBatchPayload; updateManyBrands: IBatchPayload; updateManyProducts: IBatchPayload; updateManyOrders: IBatchPayload; updateManyOrderRows: IBatchPayload; updateManyDiscountCodes: IBatchPayload; deleteManyUsers: IBatchPayload; deleteManyBrands: IBatchPayload; deleteManyProducts: IBatchPayload; deleteManyOrders: IBatchPayload; deleteManyOrderRows: IBatchPayload; deleteManyDiscountCodes: IBatchPayload; } interface ICreateUserOnMutationArguments { data: IUserCreateInput; } interface ICreateBrandOnMutationArguments { data: IBrandCreateInput; } interface ICreateProductOnMutationArguments { data: IProductCreateInput; } interface ICreateOrderOnMutationArguments { data: IOrderCreateInput; } interface ICreateOrderRowOnMutationArguments { data: IOrderRowCreateInput; } interface ICreateDiscountCodeOnMutationArguments { data: IDiscountCodeCreateInput; } interface IUpdateUserOnMutationArguments { data: IUserUpdateInput; where: IUserWhereUniqueInput; } interface IUpdateBrandOnMutationArguments { data: IBrandUpdateInput; where: IBrandWhereUniqueInput; } interface IUpdateProductOnMutationArguments { data: IProductUpdateInput; where: IProductWhereUniqueInput; } interface IUpdateOrderOnMutationArguments { data: IOrderUpdateInput; where: IOrderWhereUniqueInput; } interface IUpdateOrderRowOnMutationArguments { data: IOrderRowUpdateInput; where: IOrderRowWhereUniqueInput; } interface IUpdateDiscountCodeOnMutationArguments { data: IDiscountCodeUpdateInput; where: IDiscountCodeWhereUniqueInput; } interface IDeleteUserOnMutationArguments { where: IUserWhereUniqueInput; } interface IDeleteBrandOnMutationArguments { where: IBrandWhereUniqueInput; } interface IDeleteProductOnMutationArguments { where: IProductWhereUniqueInput; } interface IDeleteOrderOnMutationArguments { where: IOrderWhereUniqueInput; } interface IDeleteOrderRowOnMutationArguments { where: IOrderRowWhereUniqueInput; } interface IDeleteDiscountCodeOnMutationArguments { where: IDiscountCodeWhereUniqueInput; } interface IUpsertUserOnMutationArguments { where: IUserWhereUniqueInput; create: IUserCreateInput; update: IUserUpdateInput; } interface IUpsertBrandOnMutationArguments { where: IBrandWhereUniqueInput; create: IBrandCreateInput; update: IBrandUpdateInput; } interface IUpsertProductOnMutationArguments { where: IProductWhereUniqueInput; create: IProductCreateInput; update: IProductUpdateInput; } interface IUpsertOrderOnMutationArguments { where: IOrderWhereUniqueInput; create: IOrderCreateInput; update: IOrderUpdateInput; } interface IUpsertOrderRowOnMutationArguments { where: IOrderRowWhereUniqueInput; create: IOrderRowCreateInput; update: IOrderRowUpdateInput; } interface IUpsertDiscountCodeOnMutationArguments { where: IDiscountCodeWhereUniqueInput; create: IDiscountCodeCreateInput; update: IDiscountCodeUpdateInput; } interface IUpdateManyUsersOnMutationArguments { data: IUserUpdateInput; where: IUserWhereInput; } interface IUpdateManyBrandsOnMutationArguments { data: IBrandUpdateInput; where: IBrandWhereInput; } interface IUpdateManyProductsOnMutationArguments { data: IProductUpdateInput; where: IProductWhereInput; } interface IUpdateManyOrdersOnMutationArguments { data: IOrderUpdateInput; where: IOrderWhereInput; } interface IUpdateManyOrderRowsOnMutationArguments { data: IOrderRowUpdateInput; where: IOrderRowWhereInput; } interface IUpdateManyDiscountCodesOnMutationArguments { data: IDiscountCodeUpdateInput; where: IDiscountCodeWhereInput; } interface IDeleteManyUsersOnMutationArguments { where: IUserWhereInput; } interface IDeleteManyBrandsOnMutationArguments { where: IBrandWhereInput; } interface IDeleteManyProductsOnMutationArguments { where: IProductWhereInput; } interface IDeleteManyOrdersOnMutationArguments { where: IOrderWhereInput; } interface IDeleteManyOrderRowsOnMutationArguments { where: IOrderRowWhereInput; } interface IDeleteManyDiscountCodesOnMutationArguments { where: IDiscountCodeWhereInput; } interface IUserCreateInput { email: string; password: string; name: string; } interface IBrandCreateInput { name: string; slug: string; url: string; } interface IProductCreateInput { price: number; name: string; slug: string; thumbnail: string; brand: IBrandCreateOneInput; } interface IBrandCreateOneInput { create?: IBrandCreateInput | null; connect?: IBrandWhereUniqueInput | null; } interface IOrderCreateInput { rows?: IOrderRowCreateManyWithoutOrderInput | null; user?: IUserCreateOneInput | null; discountCodes?: IDiscountCodeCreateManyInput | null; } interface IOrderRowCreateManyWithoutOrderInput { create: Array; connect: Array; } interface IOrderRowCreateWithoutOrderInput { quantity?: number | null; product: IProductCreateOneInput; } interface IProductCreateOneInput { create?: IProductCreateInput | null; connect?: IProductWhereUniqueInput | null; } interface IUserCreateOneInput { create?: IUserCreateInput | null; connect?: IUserWhereUniqueInput | null; } interface IDiscountCodeCreateManyInput { create: Array; connect: Array; } interface IDiscountCodeCreateInput { code: string; name: string; description: string; type: DiscountCodeType; amount: number; } interface IOrderRowCreateInput { quantity?: number | null; product: IProductCreateOneInput; order: IOrderCreateOneWithoutRowsInput; } interface IOrderCreateOneWithoutRowsInput { create?: IOrderCreateWithoutRowsInput | null; connect?: IOrderWhereUniqueInput | null; } interface IOrderCreateWithoutRowsInput { user?: IUserCreateOneInput | null; discountCodes?: IDiscountCodeCreateManyInput | null; } interface IUserUpdateInput { email?: string | null; password?: string | null; name?: string | null; } interface IBrandUpdateInput { name?: string | null; slug?: string | null; url?: string | null; } interface IProductUpdateInput { price?: number | null; name?: string | null; slug?: string | null; thumbnail?: string | null; brand?: IBrandUpdateOneInput | null; } interface IBrandUpdateOneInput { create?: IBrandCreateInput | null; connect?: IBrandWhereUniqueInput | null; delete?: boolean | null; update?: IBrandUpdateDataInput | null; upsert?: IBrandUpsertNestedInput | null; } interface IBrandUpdateDataInput { name?: string | null; slug?: string | null; url?: string | null; } interface IBrandUpsertNestedInput { update: IBrandUpdateDataInput; create: IBrandCreateInput; } interface IOrderUpdateInput { rows?: IOrderRowUpdateManyWithoutOrderInput | null; user?: IUserUpdateOneInput | null; discountCodes?: IDiscountCodeUpdateManyInput | null; } interface IOrderRowUpdateManyWithoutOrderInput { create: Array; connect: Array; disconnect: Array; delete: Array; update: Array; upsert: Array; } interface IOrderRowUpdateWithWhereUniqueWithoutOrderInput { where: IOrderRowWhereUniqueInput; data: IOrderRowUpdateWithoutOrderDataInput; } interface IOrderRowUpdateWithoutOrderDataInput { quantity?: number | null; product?: IProductUpdateOneInput | null; } interface IProductUpdateOneInput { create?: IProductCreateInput | null; connect?: IProductWhereUniqueInput | null; delete?: boolean | null; update?: IProductUpdateDataInput | null; upsert?: IProductUpsertNestedInput | null; } interface IProductUpdateDataInput { price?: number | null; name?: string | null; slug?: string | null; thumbnail?: string | null; brand?: IBrandUpdateOneInput | null; } interface IProductUpsertNestedInput { update: IProductUpdateDataInput; create: IProductCreateInput; } interface IOrderRowUpsertWithWhereUniqueWithoutOrderInput { where: IOrderRowWhereUniqueInput; update: IOrderRowUpdateWithoutOrderDataInput; create: IOrderRowCreateWithoutOrderInput; } interface IUserUpdateOneInput { create?: IUserCreateInput | null; connect?: IUserWhereUniqueInput | null; disconnect?: boolean | null; delete?: boolean | null; update?: IUserUpdateDataInput | null; upsert?: IUserUpsertNestedInput | null; } interface IUserUpdateDataInput { email?: string | null; password?: string | null; name?: string | null; } interface IUserUpsertNestedInput { update: IUserUpdateDataInput; create: IUserCreateInput; } interface IDiscountCodeUpdateManyInput { create: Array; connect: Array; disconnect: Array; delete: Array; update: Array; upsert: Array; } interface IDiscountCodeUpdateWithWhereUniqueNestedInput { where: IDiscountCodeWhereUniqueInput; data: IDiscountCodeUpdateDataInput; } interface IDiscountCodeUpdateDataInput { code?: string | null; name?: string | null; description?: string | null; type?: DiscountCodeType | null; amount?: number | null; } interface IDiscountCodeUpsertWithWhereUniqueNestedInput { where: IDiscountCodeWhereUniqueInput; update: IDiscountCodeUpdateDataInput; create: IDiscountCodeCreateInput; } interface IOrderRowUpdateInput { quantity?: number | null; product?: IProductUpdateOneInput | null; order?: IOrderUpdateOneWithoutRowsInput | null; } interface IOrderUpdateOneWithoutRowsInput { create?: IOrderCreateWithoutRowsInput | null; connect?: IOrderWhereUniqueInput | null; delete?: boolean | null; update?: IOrderUpdateWithoutRowsDataInput | null; upsert?: IOrderUpsertWithoutRowsInput | null; } interface IOrderUpdateWithoutRowsDataInput { user?: IUserUpdateOneInput | null; discountCodes?: IDiscountCodeUpdateManyInput | null; } interface IOrderUpsertWithoutRowsInput { update: IOrderUpdateWithoutRowsDataInput; create: IOrderCreateWithoutRowsInput; } interface IDiscountCodeUpdateInput { code?: string | null; name?: string | null; description?: string | null; type?: DiscountCodeType | null; amount?: number | null; } interface IBatchPayload { __typename: 'BatchPayload'; /** * The number of nodes that have been affected by the Batch operation. */ count: any; } interface ISubscription { __typename: 'Subscription'; user: IUserSubscriptionPayload | null; brand: IBrandSubscriptionPayload | null; product: IProductSubscriptionPayload | null; order: IOrderSubscriptionPayload | null; orderRow: IOrderRowSubscriptionPayload | null; discountCode: IDiscountCodeSubscriptionPayload | null; } interface IUserOnSubscriptionArguments { where?: IUserSubscriptionWhereInput | null; } interface IBrandOnSubscriptionArguments { where?: IBrandSubscriptionWhereInput | null; } interface IProductOnSubscriptionArguments { where?: IProductSubscriptionWhereInput | null; } interface IOrderOnSubscriptionArguments { where?: IOrderSubscriptionWhereInput | null; } interface IOrderRowOnSubscriptionArguments { where?: IOrderRowSubscriptionWhereInput | null; } interface IDiscountCodeOnSubscriptionArguments { where?: IDiscountCodeSubscriptionWhereInput | null; } interface IUserSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IUserWhereInput | null; } enum MutationType { CREATED = 'CREATED', UPDATED = 'UPDATED', DELETED = 'DELETED', } interface IUserSubscriptionPayload { __typename: 'UserSubscriptionPayload'; mutation: MutationType; node: IUser | null; updatedFields: Array; previousValues: IUserPreviousValues | null; } interface IUserPreviousValues { __typename: 'UserPreviousValues'; id: string; email: string; password: string; name: string; } interface IBrandSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IBrandWhereInput | null; } interface IBrandSubscriptionPayload { __typename: 'BrandSubscriptionPayload'; mutation: MutationType; node: IBrand | null; updatedFields: Array; previousValues: IBrandPreviousValues | null; } interface IBrandPreviousValues { __typename: 'BrandPreviousValues'; id: string; createdAt: any; updatedAt: any; name: string; slug: string; url: string; } interface IProductSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IProductWhereInput | null; } interface IProductSubscriptionPayload { __typename: 'ProductSubscriptionPayload'; mutation: MutationType; node: IProduct | null; updatedFields: Array; previousValues: IProductPreviousValues | null; } interface IProductPreviousValues { __typename: 'ProductPreviousValues'; id: string; createdAt: any; updatedAt: any; price: number; name: string; slug: string; thumbnail: string; } interface IOrderSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IOrderWhereInput | null; } interface IOrderSubscriptionPayload { __typename: 'OrderSubscriptionPayload'; mutation: MutationType; node: IOrder | null; updatedFields: Array; previousValues: IOrderPreviousValues | null; } interface IOrderPreviousValues { __typename: 'OrderPreviousValues'; id: string; createdAt: any; updatedAt: any; } interface IOrderRowSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IOrderRowWhereInput | null; } interface IOrderRowSubscriptionPayload { __typename: 'OrderRowSubscriptionPayload'; mutation: MutationType; node: IOrderRow | null; updatedFields: Array; previousValues: IOrderRowPreviousValues | null; } interface IOrderRowPreviousValues { __typename: 'OrderRowPreviousValues'; id: string; createdAt: any; updatedAt: any; quantity: number; } interface IDiscountCodeSubscriptionWhereInput { /** * Logical AND on all given filters. */ AND: Array; /** * Logical OR on all given filters. */ OR: Array; /** * The subscription event gets dispatched when it's listed in mutation_in */ mutation_in: Array; /** * The subscription event gets only dispatched when one of the updated fields names is included in this list */ updatedFields_contains?: string | null; /** * The subscription event gets only dispatched when all of the field names included in this list have been updated */ updatedFields_contains_every: Array; /** * The subscription event gets only dispatched when some of the field names included in this list have been updated */ updatedFields_contains_some: Array; node?: IDiscountCodeWhereInput | null; } interface IDiscountCodeSubscriptionPayload { __typename: 'DiscountCodeSubscriptionPayload'; mutation: MutationType; node: IDiscountCode | null; updatedFields: Array; previousValues: IDiscountCodePreviousValues | null; } interface IDiscountCodePreviousValues { __typename: 'DiscountCodePreviousValues'; id: string; createdAt: any; updatedAt: any; code: string; name: string; description: string; type: DiscountCodeType; amount: number; } } // tslint:enable ```
kbrandwijk commented 6 years ago

@KATT Because it solved only half of our goals, which was to both create type definitions, and also create a Binding class to use in your server.