diff --git a/package-lock.json b/package-lock.json index 4a141e53..db79c352 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prisma-binding", - "version": "1.6.0-beta.25", + "version": "0.0.0-semantic-release", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2365,46 +2365,15 @@ } }, "graphql-binding": { - "version": "1.4.0-beta.29", - "resolved": "https://registry.npmjs.org/graphql-binding/-/graphql-binding-1.4.0-beta.29.tgz", - "integrity": "sha512-ofMg/Dk8NQvB5BucxjIEdmoqV9t6OyKeI+OVheuO2iY0etKvSb29Gc2+i32pZie/H1VQ+AolTloYA/dOlZZHWg==", + "version": "git+https://github.com/medelman17/graphql-binding.git#660deb79b8c05cfcb615f73b9e247d505a809ee2", "requires": { "graphql-import": "0.5.2", - "graphql-tools": "3.0.0", + "graphql-tools": "3.0.1", "iterall": "1.2.2", "object-path-immutable": "1.0.2", "resolve-cwd": "2.0.0", "ts-node": "6.0.3", "yargs": "11.0.0" - }, - "dependencies": { - "@types/node": { - "version": "9.6.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.14.tgz", - "integrity": "sha512-a0mGovBom+nXeDQkgS13AgHGpN+DLR+qTuRWZA7y9FTEiuTbDlXUwhz4+yShOobZGebmjBcl+tTEirTwBlA2LA==" - }, - "apollo-link": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.1.tgz", - "integrity": "sha512-6Ghf+j3cQLCIvjXd2dJrLw+16HZbWbwmB1qlTc41BviB2hv+rK1nJr17Y9dWK0UD4p3i9Hfddx3tthpMKrueHg==", - "requires": { - "@types/node": "9.6.14", - "apollo-utilities": "1.0.12", - "zen-observable-ts": "0.8.9" - } - }, - "graphql-tools": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-3.0.0.tgz", - "integrity": "sha512-orcLQm0pc6dcIvFyAudgmno/akZy07bbMalTv5dj6B8uW2ZPmwIANr7pDEJoiumb67h2kZjsU9yvgTwmF0kMPQ==", - "requires": { - "apollo-link": "1.2.1", - "apollo-utilities": "1.0.12", - "deprecated-decorator": "0.1.6", - "iterall": "1.2.2", - "uuid": "3.2.1" - } - } } }, "graphql-import": { diff --git a/src/PrismaFlowGenerator.test.js.md b/src/PrismaFlowGenerator.test.js.md new file mode 100644 index 00000000..fa19fbbe --- /dev/null +++ b/src/PrismaFlowGenerator.test.js.md @@ -0,0 +1,1228 @@ +# Snapshot report for `dist/PrismaFlowGenerator.test.js` + +The actual snapshot is saved in `PrismaFlowGenerator.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## flow generator + +> Snapshot 1 + + `/**␊ + * @flow␊ + */␊ + import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'␊ + import { IResolvers } from 'graphql-tools/dist/Interfaces'␊ + import { Options } from 'graphql-binding'␊ + import { makePrismaBindingClass, BasePrismaOptions } from 'prisma-binding'␊ + ␊ + export interface Query {␊ + posts(args: { where?: PostWhereInput, orderBy?: PostOrderByInput, skip?: Int, after?: String, before?: String, first?: Int, last?: Int }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + users(args: { where?: UserWhereInput, orderBy?: UserOrderByInput, skip?: Int, after?: String, before?: String, first?: Int, last?: Int }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + post(args: { where: PostWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + user(args: { where: UserWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + postsConnection(args: { where?: PostWhereInput, orderBy?: PostOrderByInput, skip?: Int, after?: String, before?: String, first?: Int, last?: Int }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + usersConnection(args: { where?: UserWhereInput, orderBy?: UserOrderByInput, skip?: Int, after?: String, before?: String, first?: Int, last?: Int }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + node(args: { id: ID_Output }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + }␊ + ␊ + export interface Mutation {␊ + createPost(args: { data: PostCreateInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + createUser(args: { data: UserCreateInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + updatePost(args: { data: PostUpdateInput, where: PostWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + updateUser(args: { data: UserUpdateInput, where: UserWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + deletePost(args: { where: PostWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + deleteUser(args: { where: UserWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + upsertPost(args: { where: PostWhereUniqueInput, create: PostCreateInput, update: PostUpdateInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + upsertUser(args: { where: UserWhereUniqueInput, create: UserCreateInput, update: UserUpdateInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + updateManyPosts(args: { data: PostUpdateInput, where: PostWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + updateManyUsers(args: { data: UserUpdateInput, where: UserWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + deleteManyPosts(args: { where: PostWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + deleteManyUsers(args: { where: UserWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise; ␊ + }␊ + ␊ + export interface Subscription {␊ + post(args: { where?: PostSubscriptionWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise>; ␊ + user(args: { where?: UserSubscriptionWhereInput }, info?: GraphQLResolveInfo | string, options?: Options): Promise>; ␊ + }␊ + ␊ + export interface Exists {␊ + Post(where?: PostWhereInput): Promise;␊ + User(where?: UserWhereInput): Promise;␊ + }␊ + ␊ + export interface Prisma {␊ + query: Query;␊ + mutation: Mutation;␊ + subscription: Subscription;␊ + exists: Exists;␊ + request(query: string, variables?: {[key: string]: any}): Promise;␊ + delegate(operation: 'query' | 'mutation', fieldName: string, args: {␊ + [key: string]: any;␊ + }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise;␊ + delegateSubscription(fieldName: string, args?: {␊ + [key: string]: any;␊ + }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise>;␊ + getAbstractResolvers(filterSchema?: GraphQLSchema | string): IResolvers;␊ + }␊ + ␊ + export interface BindingConstructor {␊ + new(options: BasePrismaOptions): T␊ + }␊ + /**␊ + * Type Defs␊ + */␊ + ␊ + const typeDefs = `type AggregatePost {␊ + count: Int!␊ + }␊ + ␊ + type AggregateUser {␊ + count: Int!␊ + }␊ + ␊ + type BatchPayload {␊ + """The number of nodes that have been affected by the Batch operation."""␊ + count: Long!␊ + }␊ + ␊ + scalar DateTime␊ + ␊ + """␊ + The \\`Long\\` scalar type represents non-fractional signed whole numeric values.␊ + Long can represent values between -(2^63) and 2^63 - 1.␊ + """␊ + scalar Long␊ + ␊ + type Mutation {␊ + createPost(data: PostCreateInput!): Post!␊ + createUser(data: UserCreateInput!): User!␊ + updatePost(data: PostUpdateInput!, where: PostWhereUniqueInput!): Post␊ + updateUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User␊ + deletePost(where: PostWhereUniqueInput!): Post␊ + deleteUser(where: UserWhereUniqueInput!): User␊ + upsertPost(where: PostWhereUniqueInput!, create: PostCreateInput!, update: PostUpdateInput!): Post!␊ + upsertUser(where: UserWhereUniqueInput!, create: UserCreateInput!, update: UserUpdateInput!): User!␊ + updateManyPosts(data: PostUpdateInput!, where: PostWhereInput!): BatchPayload!␊ + updateManyUsers(data: UserUpdateInput!, where: UserWhereInput!): BatchPayload!␊ + deleteManyPosts(where: PostWhereInput!): BatchPayload!␊ + deleteManyUsers(where: UserWhereInput!): BatchPayload!␊ + }␊ + ␊ + enum MutationType {␊ + CREATED␊ + UPDATED␊ + DELETED␊ + }␊ + ␊ + """An object with an ID"""␊ + interface Node {␊ + """The id of the object."""␊ + id: ID!␊ + }␊ + ␊ + """Information about pagination in a connection."""␊ + type 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␊ + ␊ + """When paginating forwards, the cursor to continue."""␊ + endCursor: String␊ + }␊ + ␊ + type Post implements Node {␊ + id: ID!␊ + createdAt: DateTime!␊ + updatedAt: DateTime!␊ + isPublished: Boolean!␊ + title: String!␊ + text: String!␊ + author(where: UserWhereInput): User!␊ + }␊ + ␊ + """A connection to a list of items."""␊ + type PostConnection {␊ + """Information to aid in pagination."""␊ + pageInfo: PageInfo!␊ + ␊ + """A list of edges."""␊ + edges: [PostEdge]!␊ + aggregate: AggregatePost!␊ + }␊ + ␊ + input PostCreateInput {␊ + isPublished: Boolean␊ + title: String!␊ + text: String!␊ + author: UserCreateOneWithoutPostsInput!␊ + }␊ + ␊ + input PostCreateManyWithoutAuthorInput {␊ + create: [PostCreateWithoutAuthorInput!]␊ + connect: [PostWhereUniqueInput!]␊ + }␊ + ␊ + input PostCreateWithoutAuthorInput {␊ + isPublished: Boolean␊ + title: String!␊ + text: String!␊ + }␊ + ␊ + """An edge in a connection."""␊ + type PostEdge {␊ + """The item at the end of the edge."""␊ + node: Post!␊ + ␊ + """A cursor for use in pagination."""␊ + cursor: String!␊ + }␊ + ␊ + enum PostOrderByInput {␊ + id_ASC␊ + id_DESC␊ + createdAt_ASC␊ + createdAt_DESC␊ + updatedAt_ASC␊ + updatedAt_DESC␊ + isPublished_ASC␊ + isPublished_DESC␊ + title_ASC␊ + title_DESC␊ + text_ASC␊ + text_DESC␊ + }␊ + ␊ + type PostPreviousValues {␊ + id: ID!␊ + createdAt: DateTime!␊ + updatedAt: DateTime!␊ + isPublished: Boolean!␊ + title: String!␊ + text: String!␊ + }␊ + ␊ + type PostSubscriptionPayload {␊ + mutation: MutationType!␊ + node: Post␊ + updatedFields: [String!]␊ + previousValues: PostPreviousValues␊ + }␊ + ␊ + input PostSubscriptionWhereInput {␊ + """Logical AND on all given filters."""␊ + AND: [PostSubscriptionWhereInput!]␊ + ␊ + """Logical OR on all given filters."""␊ + OR: [PostSubscriptionWhereInput!]␊ + ␊ + """␊ + The subscription event gets dispatched when it's listed in mutation_in␊ + """␊ + mutation_in: [MutationType!]␊ + ␊ + """␊ + The subscription event gets only dispatched when one of the updated fields names is included in this list␊ + """␊ + updatedFields_contains: String␊ + ␊ + """␊ + The subscription event gets only dispatched when all of the field names included in this list have been updated␊ + """␊ + updatedFields_contains_every: [String!]␊ + ␊ + """␊ + The subscription event gets only dispatched when some of the field names included in this list have been updated␊ + """␊ + updatedFields_contains_some: [String!]␊ + node: PostWhereInput␊ + }␊ + ␊ + input PostUpdateInput {␊ + isPublished: Boolean␊ + title: String␊ + text: String␊ + author: UserUpdateOneWithoutPostsInput␊ + }␊ + ␊ + input PostUpdateManyWithoutAuthorInput {␊ + create: [PostCreateWithoutAuthorInput!]␊ + connect: [PostWhereUniqueInput!]␊ + disconnect: [PostWhereUniqueInput!]␊ + delete: [PostWhereUniqueInput!]␊ + update: [PostUpdateWithWhereUniqueWithoutAuthorInput!]␊ + upsert: [PostUpsertWithWhereUniqueWithoutAuthorInput!]␊ + }␊ + ␊ + input PostUpdateWithoutAuthorDataInput {␊ + isPublished: Boolean␊ + title: String␊ + text: String␊ + }␊ + ␊ + input PostUpdateWithWhereUniqueWithoutAuthorInput {␊ + where: PostWhereUniqueInput!␊ + data: PostUpdateWithoutAuthorDataInput!␊ + }␊ + ␊ + input PostUpsertWithWhereUniqueWithoutAuthorInput {␊ + where: PostWhereUniqueInput!␊ + update: PostUpdateWithoutAuthorDataInput!␊ + create: PostCreateWithoutAuthorInput!␊ + }␊ + ␊ + input PostWhereInput {␊ + """Logical AND on all given filters."""␊ + AND: [PostWhereInput!]␊ + ␊ + """Logical OR on all given filters."""␊ + OR: [PostWhereInput!]␊ + id: ID␊ + ␊ + """All values that are not equal to given value."""␊ + id_not: ID␊ + ␊ + """All values that are contained in given list."""␊ + id_in: [ID!]␊ + ␊ + """All values that are not contained in given list."""␊ + id_not_in: [ID!]␊ + ␊ + """All values less than the given value."""␊ + id_lt: ID␊ + ␊ + """All values less than or equal the given value."""␊ + id_lte: ID␊ + ␊ + """All values greater than the given value."""␊ + id_gt: ID␊ + ␊ + """All values greater than or equal the given value."""␊ + id_gte: ID␊ + ␊ + """All values containing the given string."""␊ + id_contains: ID␊ + ␊ + """All values not containing the given string."""␊ + id_not_contains: ID␊ + ␊ + """All values starting with the given string."""␊ + id_starts_with: ID␊ + ␊ + """All values not starting with the given string."""␊ + id_not_starts_with: ID␊ + ␊ + """All values ending with the given string."""␊ + id_ends_with: ID␊ + ␊ + """All values not ending with the given string."""␊ + id_not_ends_with: ID␊ + createdAt: DateTime␊ + ␊ + """All values that are not equal to given value."""␊ + createdAt_not: DateTime␊ + ␊ + """All values that are contained in given list."""␊ + createdAt_in: [DateTime!]␊ + ␊ + """All values that are not contained in given list."""␊ + createdAt_not_in: [DateTime!]␊ + ␊ + """All values less than the given value."""␊ + createdAt_lt: DateTime␊ + ␊ + """All values less than or equal the given value."""␊ + createdAt_lte: DateTime␊ + ␊ + """All values greater than the given value."""␊ + createdAt_gt: DateTime␊ + ␊ + """All values greater than or equal the given value."""␊ + createdAt_gte: DateTime␊ + updatedAt: DateTime␊ + ␊ + """All values that are not equal to given value."""␊ + updatedAt_not: DateTime␊ + ␊ + """All values that are contained in given list."""␊ + updatedAt_in: [DateTime!]␊ + ␊ + """All values that are not contained in given list."""␊ + updatedAt_not_in: [DateTime!]␊ + ␊ + """All values less than the given value."""␊ + updatedAt_lt: DateTime␊ + ␊ + """All values less than or equal the given value."""␊ + updatedAt_lte: DateTime␊ + ␊ + """All values greater than the given value."""␊ + updatedAt_gt: DateTime␊ + ␊ + """All values greater than or equal the given value."""␊ + updatedAt_gte: DateTime␊ + isPublished: Boolean␊ + ␊ + """All values that are not equal to given value."""␊ + isPublished_not: Boolean␊ + title: String␊ + ␊ + """All values that are not equal to given value."""␊ + title_not: String␊ + ␊ + """All values that are contained in given list."""␊ + title_in: [String!]␊ + ␊ + """All values that are not contained in given list."""␊ + title_not_in: [String!]␊ + ␊ + """All values less than the given value."""␊ + title_lt: String␊ + ␊ + """All values less than or equal the given value."""␊ + title_lte: String␊ + ␊ + """All values greater than the given value."""␊ + title_gt: String␊ + ␊ + """All values greater than or equal the given value."""␊ + title_gte: String␊ + ␊ + """All values containing the given string."""␊ + title_contains: String␊ + ␊ + """All values not containing the given string."""␊ + title_not_contains: String␊ + ␊ + """All values starting with the given string."""␊ + title_starts_with: String␊ + ␊ + """All values not starting with the given string."""␊ + title_not_starts_with: String␊ + ␊ + """All values ending with the given string."""␊ + title_ends_with: String␊ + ␊ + """All values not ending with the given string."""␊ + title_not_ends_with: String␊ + text: String␊ + ␊ + """All values that are not equal to given value."""␊ + text_not: String␊ + ␊ + """All values that are contained in given list."""␊ + text_in: [String!]␊ + ␊ + """All values that are not contained in given list."""␊ + text_not_in: [String!]␊ + ␊ + """All values less than the given value."""␊ + text_lt: String␊ + ␊ + """All values less than or equal the given value."""␊ + text_lte: String␊ + ␊ + """All values greater than the given value."""␊ + text_gt: String␊ + ␊ + """All values greater than or equal the given value."""␊ + text_gte: String␊ + ␊ + """All values containing the given string."""␊ + text_contains: String␊ + ␊ + """All values not containing the given string."""␊ + text_not_contains: String␊ + ␊ + """All values starting with the given string."""␊ + text_starts_with: String␊ + ␊ + """All values not starting with the given string."""␊ + text_not_starts_with: String␊ + ␊ + """All values ending with the given string."""␊ + text_ends_with: String␊ + ␊ + """All values not ending with the given string."""␊ + text_not_ends_with: String␊ + author: UserWhereInput␊ + }␊ + ␊ + input PostWhereUniqueInput {␊ + id: ID␊ + }␊ + ␊ + type Query {␊ + posts(where: PostWhereInput, orderBy: PostOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Post]!␊ + users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User]!␊ + post(where: PostWhereUniqueInput!): Post␊ + user(where: UserWhereUniqueInput!): User␊ + postsConnection(where: PostWhereInput, orderBy: PostOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): PostConnection!␊ + usersConnection(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): UserConnection!␊ + ␊ + """Fetches an object given its ID"""␊ + node(␊ + """The ID of an object"""␊ + id: ID!␊ + ): Node␊ + }␊ + ␊ + type Subscription {␊ + post(where: PostSubscriptionWhereInput): PostSubscriptionPayload␊ + user(where: UserSubscriptionWhereInput): UserSubscriptionPayload␊ + }␊ + ␊ + type User implements Node {␊ + id: ID!␊ + email: String!␊ + password: String!␊ + name: String!␊ + posts(where: PostWhereInput, orderBy: PostOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Post!]␊ + }␊ + ␊ + """A connection to a list of items."""␊ + type UserConnection {␊ + """Information to aid in pagination."""␊ + pageInfo: PageInfo!␊ + ␊ + """A list of edges."""␊ + edges: [UserEdge]!␊ + aggregate: AggregateUser!␊ + }␊ + ␊ + input UserCreateInput {␊ + email: String!␊ + password: String!␊ + name: String!␊ + posts: PostCreateManyWithoutAuthorInput␊ + }␊ + ␊ + input UserCreateOneWithoutPostsInput {␊ + create: UserCreateWithoutPostsInput␊ + connect: UserWhereUniqueInput␊ + }␊ + ␊ + input UserCreateWithoutPostsInput {␊ + email: String!␊ + password: String!␊ + name: String!␊ + }␊ + ␊ + """An edge in a connection."""␊ + type UserEdge {␊ + """The item at the end of the edge."""␊ + node: User!␊ + ␊ + """A cursor for use in pagination."""␊ + cursor: String!␊ + }␊ + ␊ + enum UserOrderByInput {␊ + id_ASC␊ + id_DESC␊ + email_ASC␊ + email_DESC␊ + password_ASC␊ + password_DESC␊ + name_ASC␊ + name_DESC␊ + updatedAt_ASC␊ + updatedAt_DESC␊ + createdAt_ASC␊ + createdAt_DESC␊ + }␊ + ␊ + type UserPreviousValues {␊ + id: ID!␊ + email: String!␊ + password: String!␊ + name: String!␊ + }␊ + ␊ + type UserSubscriptionPayload {␊ + mutation: MutationType!␊ + node: User␊ + updatedFields: [String!]␊ + previousValues: UserPreviousValues␊ + }␊ + ␊ + input UserSubscriptionWhereInput {␊ + """Logical AND on all given filters."""␊ + AND: [UserSubscriptionWhereInput!]␊ + ␊ + """Logical OR on all given filters."""␊ + OR: [UserSubscriptionWhereInput!]␊ + ␊ + """␊ + The subscription event gets dispatched when it's listed in mutation_in␊ + """␊ + mutation_in: [MutationType!]␊ + ␊ + """␊ + The subscription event gets only dispatched when one of the updated fields names is included in this list␊ + """␊ + updatedFields_contains: String␊ + ␊ + """␊ + The subscription event gets only dispatched when all of the field names included in this list have been updated␊ + """␊ + updatedFields_contains_every: [String!]␊ + ␊ + """␊ + The subscription event gets only dispatched when some of the field names included in this list have been updated␊ + """␊ + updatedFields_contains_some: [String!]␊ + node: UserWhereInput␊ + }␊ + ␊ + input UserUpdateInput {␊ + email: String␊ + password: String␊ + name: String␊ + posts: PostUpdateManyWithoutAuthorInput␊ + }␊ + ␊ + input UserUpdateOneWithoutPostsInput {␊ + create: UserCreateWithoutPostsInput␊ + connect: UserWhereUniqueInput␊ + delete: Boolean␊ + update: UserUpdateWithoutPostsDataInput␊ + upsert: UserUpsertWithoutPostsInput␊ + }␊ + ␊ + input UserUpdateWithoutPostsDataInput {␊ + email: String␊ + password: String␊ + name: String␊ + }␊ + ␊ + input UserUpsertWithoutPostsInput {␊ + update: UserUpdateWithoutPostsDataInput!␊ + create: UserCreateWithoutPostsInput!␊ + }␊ + ␊ + input UserWhereInput {␊ + """Logical AND on all given filters."""␊ + AND: [UserWhereInput!]␊ + ␊ + """Logical OR on all given filters."""␊ + OR: [UserWhereInput!]␊ + id: ID␊ + ␊ + """All values that are not equal to given value."""␊ + id_not: ID␊ + ␊ + """All values that are contained in given list."""␊ + id_in: [ID!]␊ + ␊ + """All values that are not contained in given list."""␊ + id_not_in: [ID!]␊ + ␊ + """All values less than the given value."""␊ + id_lt: ID␊ + ␊ + """All values less than or equal the given value."""␊ + id_lte: ID␊ + ␊ + """All values greater than the given value."""␊ + id_gt: ID␊ + ␊ + """All values greater than or equal the given value."""␊ + id_gte: ID␊ + ␊ + """All values containing the given string."""␊ + id_contains: ID␊ + ␊ + """All values not containing the given string."""␊ + id_not_contains: ID␊ + ␊ + """All values starting with the given string."""␊ + id_starts_with: ID␊ + ␊ + """All values not starting with the given string."""␊ + id_not_starts_with: ID␊ + ␊ + """All values ending with the given string."""␊ + id_ends_with: ID␊ + ␊ + """All values not ending with the given string."""␊ + id_not_ends_with: ID␊ + email: String␊ + ␊ + """All values that are not equal to given value."""␊ + email_not: String␊ + ␊ + """All values that are contained in given list."""␊ + email_in: [String!]␊ + ␊ + """All values that are not contained in given list."""␊ + email_not_in: [String!]␊ + ␊ + """All values less than the given value."""␊ + email_lt: String␊ + ␊ + """All values less than or equal the given value."""␊ + email_lte: String␊ + ␊ + """All values greater than the given value."""␊ + email_gt: String␊ + ␊ + """All values greater than or equal the given value."""␊ + email_gte: String␊ + ␊ + """All values containing the given string."""␊ + email_contains: String␊ + ␊ + """All values not containing the given string."""␊ + email_not_contains: String␊ + ␊ + """All values starting with the given string."""␊ + email_starts_with: String␊ + ␊ + """All values not starting with the given string."""␊ + email_not_starts_with: String␊ + ␊ + """All values ending with the given string."""␊ + email_ends_with: String␊ + ␊ + """All values not ending with the given string."""␊ + email_not_ends_with: String␊ + password: String␊ + ␊ + """All values that are not equal to given value."""␊ + password_not: String␊ + ␊ + """All values that are contained in given list."""␊ + password_in: [String!]␊ + ␊ + """All values that are not contained in given list."""␊ + password_not_in: [String!]␊ + ␊ + """All values less than the given value."""␊ + password_lt: String␊ + ␊ + """All values less than or equal the given value."""␊ + password_lte: String␊ + ␊ + """All values greater than the given value."""␊ + password_gt: String␊ + ␊ + """All values greater than or equal the given value."""␊ + password_gte: String␊ + ␊ + """All values containing the given string."""␊ + password_contains: String␊ + ␊ + """All values not containing the given string."""␊ + password_not_contains: String␊ + ␊ + """All values starting with the given string."""␊ + password_starts_with: String␊ + ␊ + """All values not starting with the given string."""␊ + password_not_starts_with: String␊ + ␊ + """All values ending with the given string."""␊ + password_ends_with: String␊ + ␊ + """All values not ending with the given string."""␊ + password_not_ends_with: String␊ + name: String␊ + ␊ + """All values that are not equal to given value."""␊ + name_not: String␊ + ␊ + """All values that are contained in given list."""␊ + name_in: [String!]␊ + ␊ + """All values that are not contained in given list."""␊ + name_not_in: [String!]␊ + ␊ + """All values less than the given value."""␊ + name_lt: String␊ + ␊ + """All values less than or equal the given value."""␊ + name_lte: String␊ + ␊ + """All values greater than the given value."""␊ + name_gt: String␊ + ␊ + """All values greater than or equal the given value."""␊ + name_gte: String␊ + ␊ + """All values containing the given string."""␊ + name_contains: String␊ + ␊ + """All values not containing the given string."""␊ + name_not_contains: String␊ + ␊ + """All values starting with the given string."""␊ + name_starts_with: String␊ + ␊ + """All values not starting with the given string."""␊ + name_not_starts_with: String␊ + ␊ + """All values ending with the given string."""␊ + name_ends_with: String␊ + ␊ + """All values not ending with the given string."""␊ + name_not_ends_with: String␊ + posts_every: PostWhereInput␊ + posts_some: PostWhereInput␊ + posts_none: PostWhereInput␊ + }␊ + ␊ + input UserWhereUniqueInput {␊ + id: ID␊ + email: String␊ + }␊ + `␊ + ␊ + export const Prisma: BindingConstructor = makePrismaBindingClass({typeDefs})␊ + ␊ + /**␊ + * Types␊ + */␊ + ␊ + export type PostOrderByInput =␊ + | 'id_ASC'␊ + | 'id_DESC'␊ + | 'createdAt_ASC'␊ + | 'createdAt_DESC'␊ + | 'updatedAt_ASC'␊ + | 'updatedAt_DESC'␊ + | 'isPublished_ASC'␊ + | 'isPublished_DESC'␊ + | 'title_ASC'␊ + | 'title_DESC'␊ + | 'text_ASC'␊ + | 'text_DESC'␊ + ␊ + ␊ + export type UserOrderByInput =␊ + | 'id_ASC'␊ + | 'id_DESC'␊ + | 'email_ASC'␊ + | 'email_DESC'␊ + | 'password_ASC'␊ + | 'password_DESC'␊ + | 'name_ASC'␊ + | 'name_DESC'␊ + | 'updatedAt_ASC'␊ + | 'updatedAt_DESC'␊ + | 'createdAt_ASC'␊ + | 'createdAt_DESC'␊ + ␊ + ␊ + export type MutationType =␊ + | 'CREATED'␊ + | 'UPDATED'␊ + | 'DELETED'␊ + ␊ + ␊ + export type UserCreateOneWithoutPostsInput = {| ␊ + create?: UserCreateWithoutPostsInput,␊ + connect?: UserWhereUniqueInput␊ + |}␊ + ␊ + export type PostWhereInput = {| ␊ + AND?: Array< PostWhereInput > | PostWhereInput,␊ + OR?: Array< PostWhereInput > | PostWhereInput,␊ + id?: ID_Input,␊ + id_not?: ID_Input,␊ + id_in?: Array< ID_Input > | ID_Input,␊ + id_not_in?: Array< ID_Input > | ID_Input,␊ + id_lt?: ID_Input,␊ + id_lte?: ID_Input,␊ + id_gt?: ID_Input,␊ + id_gte?: ID_Input,␊ + id_contains?: ID_Input,␊ + id_not_contains?: ID_Input,␊ + id_starts_with?: ID_Input,␊ + id_not_starts_with?: ID_Input,␊ + id_ends_with?: ID_Input,␊ + id_not_ends_with?: ID_Input,␊ + createdAt?: DateTime,␊ + createdAt_not?: DateTime,␊ + createdAt_in?: Array< DateTime > | DateTime,␊ + createdAt_not_in?: Array< DateTime > | DateTime,␊ + createdAt_lt?: DateTime,␊ + createdAt_lte?: DateTime,␊ + createdAt_gt?: DateTime,␊ + createdAt_gte?: DateTime,␊ + updatedAt?: DateTime,␊ + updatedAt_not?: DateTime,␊ + updatedAt_in?: Array< DateTime > | DateTime,␊ + updatedAt_not_in?: Array< DateTime > | DateTime,␊ + updatedAt_lt?: DateTime,␊ + updatedAt_lte?: DateTime,␊ + updatedAt_gt?: DateTime,␊ + updatedAt_gte?: DateTime,␊ + isPublished?: Boolean,␊ + isPublished_not?: Boolean,␊ + title?: String,␊ + title_not?: String,␊ + title_in?: Array< String > | String,␊ + title_not_in?: Array< String > | String,␊ + title_lt?: String,␊ + title_lte?: String,␊ + title_gt?: String,␊ + title_gte?: String,␊ + title_contains?: String,␊ + title_not_contains?: String,␊ + title_starts_with?: String,␊ + title_not_starts_with?: String,␊ + title_ends_with?: String,␊ + title_not_ends_with?: String,␊ + text?: String,␊ + text_not?: String,␊ + text_in?: Array< String > | String,␊ + text_not_in?: Array< String > | String,␊ + text_lt?: String,␊ + text_lte?: String,␊ + text_gt?: String,␊ + text_gte?: String,␊ + text_contains?: String,␊ + text_not_contains?: String,␊ + text_starts_with?: String,␊ + text_not_starts_with?: String,␊ + text_ends_with?: String,␊ + text_not_ends_with?: String,␊ + author?: UserWhereInput␊ + |}␊ + ␊ + export type PostCreateManyWithoutAuthorInput = {| ␊ + create?: Array< PostCreateWithoutAuthorInput > | PostCreateWithoutAuthorInput,␊ + connect?: Array< PostWhereUniqueInput > | PostWhereUniqueInput␊ + |}␊ + ␊ + export type UserWhereInput = {| ␊ + AND?: Array< UserWhereInput > | UserWhereInput,␊ + OR?: Array< UserWhereInput > | UserWhereInput,␊ + id?: ID_Input,␊ + id_not?: ID_Input,␊ + id_in?: Array< ID_Input > | ID_Input,␊ + id_not_in?: Array< ID_Input > | ID_Input,␊ + id_lt?: ID_Input,␊ + id_lte?: ID_Input,␊ + id_gt?: ID_Input,␊ + id_gte?: ID_Input,␊ + id_contains?: ID_Input,␊ + id_not_contains?: ID_Input,␊ + id_starts_with?: ID_Input,␊ + id_not_starts_with?: ID_Input,␊ + id_ends_with?: ID_Input,␊ + id_not_ends_with?: ID_Input,␊ + email?: String,␊ + email_not?: String,␊ + email_in?: Array< String > | String,␊ + email_not_in?: Array< String > | String,␊ + email_lt?: String,␊ + email_lte?: String,␊ + email_gt?: String,␊ + email_gte?: String,␊ + email_contains?: String,␊ + email_not_contains?: String,␊ + email_starts_with?: String,␊ + email_not_starts_with?: String,␊ + email_ends_with?: String,␊ + email_not_ends_with?: String,␊ + password?: String,␊ + password_not?: String,␊ + password_in?: Array< String > | String,␊ + password_not_in?: Array< String > | String,␊ + password_lt?: String,␊ + password_lte?: String,␊ + password_gt?: String,␊ + password_gte?: String,␊ + password_contains?: String,␊ + password_not_contains?: String,␊ + password_starts_with?: String,␊ + password_not_starts_with?: String,␊ + password_ends_with?: String,␊ + password_not_ends_with?: String,␊ + name?: String,␊ + name_not?: String,␊ + name_in?: Array< String > | String,␊ + name_not_in?: Array< String > | String,␊ + name_lt?: String,␊ + name_lte?: String,␊ + name_gt?: String,␊ + name_gte?: String,␊ + name_contains?: String,␊ + name_not_contains?: String,␊ + name_starts_with?: String,␊ + name_not_starts_with?: String,␊ + name_ends_with?: String,␊ + name_not_ends_with?: String,␊ + posts_every?: PostWhereInput,␊ + posts_some?: PostWhereInput,␊ + posts_none?: PostWhereInput␊ + |}␊ + ␊ + export type PostUpdateManyWithoutAuthorInput = {| ␊ + create?: Array< PostCreateWithoutAuthorInput > | PostCreateWithoutAuthorInput,␊ + connect?: Array< PostWhereUniqueInput > | PostWhereUniqueInput,␊ + disconnect?: Array< PostWhereUniqueInput > | PostWhereUniqueInput,␊ + delete?: Array< PostWhereUniqueInput > | PostWhereUniqueInput,␊ + update?: Array< PostUpdateWithWhereUniqueWithoutAuthorInput > | PostUpdateWithWhereUniqueWithoutAuthorInput,␊ + upsert?: Array< PostUpsertWithWhereUniqueWithoutAuthorInput > | PostUpsertWithWhereUniqueWithoutAuthorInput␊ + |}␊ + ␊ + export type PostUpdateInput = {| ␊ + isPublished?: Boolean,␊ + title?: String,␊ + text?: String,␊ + author?: UserUpdateOneWithoutPostsInput␊ + |}␊ + ␊ + export type UserUpdateInput = {| ␊ + email?: String,␊ + password?: String,␊ + name?: String,␊ + posts?: PostUpdateManyWithoutAuthorInput␊ + |}␊ + ␊ + export type PostCreateWithoutAuthorInput = {| ␊ + isPublished?: Boolean,␊ + title: String,␊ + text: String␊ + |}␊ + ␊ + export type UserUpsertWithoutPostsInput = {| ␊ + update: UserUpdateWithoutPostsDataInput,␊ + create: UserCreateWithoutPostsInput␊ + |}␊ + ␊ + export type UserSubscriptionWhereInput = {| ␊ + AND?: Array< UserSubscriptionWhereInput > | UserSubscriptionWhereInput,␊ + OR?: Array< UserSubscriptionWhereInput > | UserSubscriptionWhereInput,␊ + mutation_in?: Array< MutationType > | MutationType,␊ + updatedFields_contains?: String,␊ + updatedFields_contains_every?: Array< String > | String,␊ + updatedFields_contains_some?: Array< String > | String,␊ + node?: UserWhereInput␊ + |}␊ + ␊ + export type UserUpdateWithoutPostsDataInput = {| ␊ + email?: String,␊ + password?: String,␊ + name?: String␊ + |}␊ + ␊ + export type PostWhereUniqueInput = {| ␊ + id?: ID_Input␊ + |}␊ + ␊ + export type PostUpsertWithWhereUniqueWithoutAuthorInput = {| ␊ + where: PostWhereUniqueInput,␊ + update: PostUpdateWithoutAuthorDataInput,␊ + create: PostCreateWithoutAuthorInput␊ + |}␊ + ␊ + export type UserCreateInput = {| ␊ + email: String,␊ + password: String,␊ + name: String,␊ + posts?: PostCreateManyWithoutAuthorInput␊ + |}␊ + ␊ + export type UserCreateWithoutPostsInput = {| ␊ + email: String,␊ + password: String,␊ + name: String␊ + |}␊ + ␊ + export type UserUpdateOneWithoutPostsInput = {| ␊ + create?: UserCreateWithoutPostsInput,␊ + connect?: UserWhereUniqueInput,␊ + delete?: Boolean,␊ + update?: UserUpdateWithoutPostsDataInput,␊ + upsert?: UserUpsertWithoutPostsInput␊ + |}␊ + ␊ + export type PostCreateInput = {| ␊ + isPublished?: Boolean,␊ + title: String,␊ + text: String,␊ + author: UserCreateOneWithoutPostsInput␊ + |}␊ + ␊ + export type PostUpdateWithoutAuthorDataInput = {| ␊ + isPublished?: Boolean,␊ + title?: String,␊ + text?: String␊ + |}␊ + ␊ + export type UserWhereUniqueInput = {| ␊ + id?: ID_Input,␊ + email?: String␊ + |}␊ + ␊ + export type PostSubscriptionWhereInput = {| ␊ + AND?: Array< PostSubscriptionWhereInput > | PostSubscriptionWhereInput,␊ + OR?: Array< PostSubscriptionWhereInput > | PostSubscriptionWhereInput,␊ + mutation_in?: Array< MutationType > | MutationType,␊ + updatedFields_contains?: String,␊ + updatedFields_contains_every?: Array< String > | String,␊ + updatedFields_contains_some?: Array< String > | String,␊ + node?: PostWhereInput␊ + |}␊ + ␊ + export type PostUpdateWithWhereUniqueWithoutAuthorInput = {| ␊ + where: PostWhereUniqueInput,␊ + data: PostUpdateWithoutAuthorDataInput␊ + |}␊ + ␊ + /*␊ + * An object with an ID␊ + ␊ + */␊ + export type Node = {| ␊ + id: ID_Output,␊ + |}␊ + ␊ + export type UserPreviousValues = {| ␊ + id: ID_Output,␊ + email: String,␊ + password: String,␊ + name: String,␊ + |}␊ + ␊ + /*␊ + * A connection to a list of items.␊ + ␊ + */␊ + export type PostConnection = {| ␊ + pageInfo: PageInfo,␊ + edges: PostEdge[],␊ + aggregate: AggregatePost,␊ + |}␊ + ␊ + export type Post = {| ...Node,␊ + ␊ + id: ID_Output,␊ + createdAt: DateTime,␊ + updatedAt: DateTime,␊ + isPublished: Boolean,␊ + title: String,␊ + text: String,␊ + author: User,␊ + |}␊ + ␊ + /*␊ + * Information about pagination in a connection.␊ + ␊ + */␊ + export type PageInfo = {| ␊ + hasNextPage: Boolean,␊ + hasPreviousPage: Boolean,␊ + startCursor?: String,␊ + endCursor?: String,␊ + |}␊ + ␊ + export type PostSubscriptionPayload = {| ␊ + mutation: MutationType,␊ + node?: Post,␊ + updatedFields?: String[],␊ + previousValues?: PostPreviousValues,␊ + |}␊ + ␊ + export type BatchPayload = {| ␊ + count: Long,␊ + |}␊ + ␊ + export type PostPreviousValues = {| ␊ + id: ID_Output,␊ + createdAt: DateTime,␊ + updatedAt: DateTime,␊ + isPublished: Boolean,␊ + title: String,␊ + text: String,␊ + |}␊ + ␊ + export type User = {| ...Node,␊ + ␊ + id: ID_Output,␊ + email: String,␊ + password: String,␊ + name: String,␊ + posts?: Post[],␊ + |}␊ + ␊ + export type AggregateUser = {| ␊ + count: Int,␊ + |}␊ + ␊ + export type UserSubscriptionPayload = {| ␊ + mutation: MutationType,␊ + node?: User,␊ + updatedFields?: String[],␊ + previousValues?: UserPreviousValues,␊ + |}␊ + ␊ + /*␊ + * An edge in a connection.␊ + ␊ + */␊ + export type UserEdge = {| ␊ + node: User,␊ + cursor: String,␊ + |}␊ + ␊ + /*␊ + * An edge in a connection.␊ + ␊ + */␊ + export type PostEdge = {| ␊ + node: Post,␊ + cursor: String,␊ + |}␊ + ␊ + export type AggregatePost = {| ␊ + count: Int,␊ + |}␊ + ␊ + /*␊ + * A connection to a list of items.␊ + ␊ + */␊ + export type UserConnection = {| ␊ + pageInfo: PageInfo,␊ + edges: UserEdge[],␊ + aggregate: AggregateUser,␊ + |}␊ + ␊ + /*␊ + The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ␊ + */␊ + export type Int = number ␊ + ␊ + /*␊ + The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.␊ + */␊ + export type ID_Input = string | number␊ + export type ID_Output = string␊ + ␊ + /*␊ + The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.␊ + */␊ + export type String = string ␊ + ␊ + /*␊ + The `Long` scalar type represents non-fractional signed whole numeric values.␊ + Long can represent values between -(2^63) and 2^63 - 1.␊ + */␊ + export type Long = string ␊ + ␊ + /*␊ + The `Boolean` scalar type represents `true` or `false`.␊ + */␊ + export type Boolean = boolean ␊ + ␊ + export type DateTime = Date | string ` diff --git a/src/PrismaFlowGenerator.test.js.snap b/src/PrismaFlowGenerator.test.js.snap new file mode 100644 index 00000000..5ac9e61a Binary files /dev/null and b/src/PrismaFlowGenerator.test.js.snap differ diff --git a/src/PrismaFlowGenerator.test.ts b/src/PrismaFlowGenerator.test.ts new file mode 100644 index 00000000..a2b3e7d2 --- /dev/null +++ b/src/PrismaFlowGenerator.test.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs' +import * as path from 'path' +import { buildSchema } from 'graphql' +import { PrismaFlowGenerator } from './PrismaFlowGenerator' +import { test } from 'ava' + +const typeDefs = fs.readFileSync( + path.join(__dirname, '../src/fixtures/schema.graphql'), + 'utf-8', +) +test('flow generator', t => { + const schema = buildSchema(typeDefs) + const generator = new PrismaFlowGenerator({ + schema, + inputSchemaPath: 'src/schema.js', + outputBindingPath: 'src/generated/binding.js', + }) + const result = generator.render() + t.snapshot(result) +}) diff --git a/src/PrismaFlowGenerator.ts b/src/PrismaFlowGenerator.ts new file mode 100644 index 00000000..ee0af52a --- /dev/null +++ b/src/PrismaFlowGenerator.ts @@ -0,0 +1,78 @@ +import { FlowGenerator } from "graphql-binding"; +import { printSchema } from 'graphql' +import { getExistsFlowTypes } from './utils' + +export class PrismaFlowGenerator extends FlowGenerator { + constructor(options) { + super(options) + } + render() { + return this.compile`\ +/** + * @flow + */ +${this.renderImports()} + +export interface Query ${this.renderQueries()} + +export interface Mutation ${this.renderMutations()} + +export interface Subscription ${this.renderSubscriptions()} + +export interface Exists ${this.renderExists()} + +export interface Prisma { + query: Query; + mutation: Mutation; + subscription: Subscription; + exists: Exists; + request(query: string, variables?: {[key: string]: any}): Promise; + delegate(operation: 'query' | 'mutation', fieldName: string, args: { + [key: string]: any; +}, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise; +delegateSubscription(fieldName: string, args?: { + [key: string]: any; +}, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise>; +getAbstractResolvers(filterSchema?: GraphQLSchema | string): IResolvers; +} + +export interface BindingConstructor { + new(options: BasePrismaOptions): T +} +/** + * Type Defs +*/ + +${this.renderTypedefs()} + +${this.renderExports()} + +/** + * Types +*/ + +${this.renderTypes()}` + } + renderImports() { + return `\ +import { GraphQLResolveInfo, GraphQLSchema } from 'graphql' +import { IResolvers } from 'graphql-tools/dist/Interfaces' +import { Options } from 'graphql-binding' +import { makePrismaBindingClass, BasePrismaOptions } from 'prisma-binding'` + } + renderExports() { + return `export const Prisma: BindingConstructor = makePrismaBindingClass({typeDefs})` + } + renderTypedefs() { + return ( + 'const typeDefs = `' + printSchema(this.schema).replace(/`/g, '\\`') + '`' + ) + } + renderExists() { + const queryType = this.schema.getQueryType() + if (queryType) { + return `{\n${getExistsFlowTypes(queryType)}\n}` + } + return '{}' + } +} \ No newline at end of file diff --git a/src/bin.ts b/src/bin.ts index 5a0d5658..1af68d2d 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -6,6 +6,7 @@ import * as mkdirp from 'mkdirp' import * as path from 'path' import { PrismaGenerator } from './PrismaGenerator' import { PrismaTypescriptGenerator } from './PrismaTypescriptGenerator' +import { PrismaFlowGenerator } from "./PrismaFlowGenerator"; import { buildSchema, printSchema } from 'graphql' import { importSchema } from 'graphql-import' @@ -21,7 +22,7 @@ const argv = yargs language: { alias: 'l', describe: - 'Type of the generator. Available generators: typescript, javascript', + 'Type of the generator. Available generators: typescript, javascript, flow', type: 'string', }, outputBinding: { @@ -52,10 +53,19 @@ async function run(argv) { if (language === 'typescript') { require('ts-node').register() } - const generatorInstance = - language === 'typescript' - ? new PrismaTypescriptGenerator(args) - : new PrismaGenerator(args) + let generatorInstance; + + switch (language) { + case 'typescript': + generatorInstance = new PrismaTypescriptGenerator(args); + break; + case 'flow': + generatorInstance = new PrismaFlowGenerator(args); + break; + default: + generatorInstance = new PrismaGenerator(args) + } + const code = generatorInstance.render() mkdirp(path.dirname(outputBinding)) diff --git a/src/utils.ts b/src/utils.ts index de9e7882..ffcfcc33 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -14,6 +14,14 @@ export function getExistsTypes(queryType: GraphQLObjectType) { .join('\n') } +export function getExistsFlowTypes(queryType: GraphQLObjectType) { + const types = getTypesAndWhere(queryType) + return types.map( + ({ type, where}) => `${type}(where?: ${where}): Promise;` + ) + .join('\n') +} + export function getTypesAndWhere(queryType: GraphQLObjectType) { const fields = queryType.getFields() const listFields = Object.keys(fields).reduce( diff --git a/yarn.lock b/yarn.lock index 06bd0cd0..8c3943a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1301,8 +1301,8 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" graphql-binding@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/graphql-binding/-/graphql-binding-2.0.0.tgz#6dce5842fef724327a2c469c5366cdf6ba903f30" + version "2.1.0" + resolved "https://registry.yarnpkg.com/graphql-binding/-/graphql-binding-2.1.0.tgz#7292aee06997f64bc9aa6f87259c5d1a35246a1e" dependencies: graphql-import "^0.5.2" graphql-tools "3.0.1"