-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make it work bump graphql-tools packages add docs make test failure reason more obvious bump graphql-tools update graphql-tools versions update graphql-config prevent folders being added to ignore list add changeset add changeset for gql-tag change plugin name chore: updating graphql-tools is a breaking change update fixture path fix config
- Loading branch information
1 parent
a89b85a
commit 2ef82eb
Showing
36 changed files
with
3,665 additions
and
2,987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@graphql-codegen/gql-tag-operations': minor | ||
'@graphql-codegen/gql-tag-operations-preset': minor | ||
--- | ||
|
||
new plugin/preset gql-tag-operations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
'@graphql-cli/codegen': major | ||
'@graphql-codegen/cli': major | ||
'@graphql-codegen/core': major | ||
'@graphql-codegen/c-sharp': major | ||
'@graphql-codegen/c-sharp-operations': major | ||
'@graphql-codegen/flow': major | ||
'@graphql-codegen/flow-operations': major | ||
'@graphql-codegen/flow-resolvers': major | ||
'@graphql-codegen/java-apollo-android': major | ||
'@graphql-codegen/java-common': major | ||
'@graphql-codegen/java': major | ||
'@graphql-codegen/kotlin': major | ||
'@graphql-codegen/java-resolvers': major | ||
'@graphql-codegen/jsdoc': major | ||
'@graphql-codegen/schema-ast': major | ||
'@graphql-codegen/visitor-plugin-common': major | ||
'@graphql-codegen/typescript-apollo-angular': major | ||
'@graphql-codegen/typescript-apollo-client-helpers': major | ||
'@graphql-codegen/typescript-compatibility': major | ||
'@graphql-codegen/typescript-document-nodes': major | ||
'@graphql-codegen/typescript-enum-array': major | ||
'@graphql-codegen/typescript-generic-sdk': major | ||
'@graphql-codegen/typescript-graphql-request': major | ||
'@graphql-codegen/typescript-mongodb': major | ||
'@graphql-codegen/typescript-oclif': major | ||
'@graphql-codegen/typescript-operations': major | ||
'@graphql-codegen/typescript-react-apollo': major | ||
'@graphql-codegen/typescript-react-offix': major | ||
'@graphql-codegen/typescript-react-query': major | ||
'@graphql-codegen/typescript-resolvers': major | ||
'@graphql-codegen/typescript-rtk-query': major | ||
'@graphql-codegen/typescript-stencil-apollo': major | ||
'@graphql-codegen/typescript-type-graphql': major | ||
'@graphql-codegen/typed-document-node': major | ||
'@graphql-codegen/typescript': major | ||
'@graphql-codegen/typescript-urql': major | ||
'@graphql-codegen/typescript-urql-graphcache': major | ||
'@graphql-codegen/urql-svelte-operations-store': major | ||
'@graphql-codegen/typescript-vue-apollo': major | ||
'@graphql-codegen/typescript-vue-apollo-smart-ops': major | ||
'@graphql-codegen/typescript-vue-urql': major | ||
'@graphql-codegen/graphql-modules-preset': major | ||
'@graphql-codegen/import-types-preset': major | ||
'@graphql-codegen/near-operation-file-preset': major | ||
'@graphql-codegen/config-schema': major | ||
'@graphql-codegen/testing': major | ||
'@graphql-codegen/plugin-helpers': major | ||
'@graphql-codegen/website': major | ||
--- | ||
|
||
update to latest graphql-tools version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev-test/githunt-invalid/invalid.graphql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INVALID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
/* eslint-disable */ | ||
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; | ||
export type Maybe<T> = T | null; | ||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; | ||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }; | ||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }; | ||
/** All built-in and custom scalars, mapped to their actual values */ | ||
export type Scalars = { | ||
ID: string; | ||
String: string; | ||
Boolean: boolean; | ||
Int: number; | ||
Float: number; | ||
Date: any; | ||
Url: any; | ||
}; | ||
|
||
export type Meta = { | ||
__typename?: 'Meta'; | ||
count?: Maybe<Scalars['Int']>; | ||
}; | ||
|
||
export type Mutation = { | ||
__typename?: 'Mutation'; | ||
createTweet?: Maybe<Tweet>; | ||
deleteTweet?: Maybe<Tweet>; | ||
markTweetRead?: Maybe<Scalars['Boolean']>; | ||
}; | ||
|
||
export type MutationCreateTweetArgs = { | ||
body?: Maybe<Scalars['String']>; | ||
}; | ||
|
||
export type MutationDeleteTweetArgs = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
export type MutationMarkTweetReadArgs = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
export type Notification = { | ||
__typename?: 'Notification'; | ||
id?: Maybe<Scalars['ID']>; | ||
date?: Maybe<Scalars['Date']>; | ||
type?: Maybe<Scalars['String']>; | ||
}; | ||
|
||
export type Query = { | ||
__typename?: 'Query'; | ||
Tweet?: Maybe<Tweet>; | ||
Tweets?: Maybe<Array<Maybe<Tweet>>>; | ||
TweetsMeta?: Maybe<Meta>; | ||
User?: Maybe<User>; | ||
Notifications?: Maybe<Array<Maybe<Notification>>>; | ||
NotificationsMeta?: Maybe<Meta>; | ||
}; | ||
|
||
export type QueryTweetArgs = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
export type QueryTweetsArgs = { | ||
limit?: Maybe<Scalars['Int']>; | ||
skip?: Maybe<Scalars['Int']>; | ||
sort_field?: Maybe<Scalars['String']>; | ||
sort_order?: Maybe<Scalars['String']>; | ||
}; | ||
|
||
export type QueryUserArgs = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
export type QueryNotificationsArgs = { | ||
limit?: Maybe<Scalars['Int']>; | ||
}; | ||
|
||
export type Stat = { | ||
__typename?: 'Stat'; | ||
views?: Maybe<Scalars['Int']>; | ||
likes?: Maybe<Scalars['Int']>; | ||
retweets?: Maybe<Scalars['Int']>; | ||
responses?: Maybe<Scalars['Int']>; | ||
}; | ||
|
||
export type Tweet = { | ||
__typename?: 'Tweet'; | ||
id: Scalars['ID']; | ||
body?: Maybe<Scalars['String']>; | ||
date?: Maybe<Scalars['Date']>; | ||
Author?: Maybe<User>; | ||
Stats?: Maybe<Stat>; | ||
}; | ||
|
||
export type User = { | ||
__typename?: 'User'; | ||
id: Scalars['ID']; | ||
username?: Maybe<Scalars['String']>; | ||
first_name?: Maybe<Scalars['String']>; | ||
last_name?: Maybe<Scalars['String']>; | ||
full_name?: Maybe<Scalars['String']>; | ||
/** @deprecated Field no longer supported */ | ||
name?: Maybe<Scalars['String']>; | ||
avatar_url?: Maybe<Scalars['Url']>; | ||
}; | ||
|
||
export type FooQueryVariables = Exact<{ [key: string]: never }>; | ||
|
||
export type FooQuery = { __typename?: 'Query' } & { | ||
Tweets?: Maybe<Array<Maybe<{ __typename?: 'Tweet' } & Pick<Tweet, 'id'>>>>; | ||
}; | ||
|
||
export type LelFragment = { __typename?: 'Tweet' } & Pick<Tweet, 'id' | 'body'>; | ||
|
||
export type BarQueryVariables = Exact<{ [key: string]: never }>; | ||
|
||
export type BarQuery = { __typename?: 'Query' } & { | ||
Tweets?: Maybe<Array<Maybe<{ __typename?: 'Tweet' } & LelFragment>>>; | ||
}; | ||
|
||
export const LelFragmentDoc = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'FragmentDefinition', | ||
name: { kind: 'Name', value: 'Lel' }, | ||
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Tweet' } }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ kind: 'Field', name: { kind: 'Name', value: 'id' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'body' } }, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<LelFragment, unknown>; | ||
export const FooDocument = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: { kind: 'Name', value: 'Foo' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'Tweets' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [{ kind: 'Field', name: { kind: 'Name', value: 'id' } }], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<FooQuery, FooQueryVariables>; | ||
export const BarDocument = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: { kind: 'Name', value: 'Bar' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'Tweets' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Lel' } }], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
...LelFragmentDoc.definitions, | ||
], | ||
} as unknown as DocumentNode<BarQuery, BarQueryVariables>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* eslint-disable */ | ||
import * as graphql from './graphql'; | ||
|
||
const documents = { | ||
'\n query Foo {\n Tweets {\n id\n }\n }\n': graphql.FooDocument, | ||
'\n fragment Lel on Tweet {\n id\n body\n }\n': graphql.LelFragmentDoc, | ||
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': graphql.BarDocument, | ||
}; | ||
|
||
export function gql( | ||
source: '\n query Foo {\n Tweets {\n id\n }\n }\n' | ||
): typeof documents['\n query Foo {\n Tweets {\n id\n }\n }\n']; | ||
export function gql( | ||
source: '\n fragment Lel on Tweet {\n id\n body\n }\n' | ||
): typeof documents['\n fragment Lel on Tweet {\n id\n body\n }\n']; | ||
export function gql( | ||
source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' | ||
): typeof documents['\n query Bar {\n Tweets {\n ...Lel\n }\n }\n']; | ||
|
||
export function gql(source: string): unknown; | ||
export function gql(source: string) { | ||
return (documents as any)[source] ?? {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
scalar Url | ||
scalar Date | ||
|
||
type Tweet { | ||
id: ID! | ||
body: String | ||
date: Date | ||
Author: User | ||
Stats: Stat | ||
} | ||
|
||
type User { | ||
id: ID! | ||
username: String | ||
first_name: String | ||
last_name: String | ||
full_name: String | ||
name: String @deprecated | ||
avatar_url: Url | ||
} | ||
|
||
type Stat { | ||
views: Int | ||
likes: Int | ||
retweets: Int | ||
responses: Int | ||
} | ||
|
||
type Notification { | ||
id: ID | ||
date: Date | ||
type: String | ||
} | ||
|
||
type Meta { | ||
count: Int | ||
} | ||
|
||
type Query { | ||
Tweet(id: ID!): Tweet | ||
Tweets(limit: Int, skip: Int, sort_field: String, sort_order: String): [Tweet] | ||
TweetsMeta: Meta | ||
User(id: ID!): User | ||
Notifications(limit: Int): [Notification] | ||
NotificationsMeta: Meta | ||
} | ||
|
||
type Mutation { | ||
createTweet(body: String): Tweet | ||
deleteTweet(id: ID!): Tweet | ||
markTweetRead(id: ID!): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
|
||
import { gql } from '../gql'; | ||
|
||
const FooQuery = gql(/* GraphQL */ ` | ||
query Foo { | ||
Tweets { | ||
id | ||
} | ||
} | ||
`); | ||
|
||
const LelFragment = gql(/* GraphQL */ ` | ||
fragment Lel on Tweet { | ||
id | ||
body | ||
} | ||
`); | ||
|
||
const BarQuery = gql(/* GraphQL */ ` | ||
query Bar { | ||
Tweets { | ||
...Lel | ||
} | ||
} | ||
`); |
Oops, something went wrong.