Skip to content

Commit

Permalink
chore: update gql generator dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed Oct 29, 2023
1 parent 3f52168 commit 8b65a41
Show file tree
Hide file tree
Showing 4 changed files with 6,838 additions and 3,213 deletions.
10 changes: 5 additions & 5 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@
"@babel/preset-typescript": "^7.3.3",
"@babel/register": "^7.13.16",
"@divyenduz/ts-graphql-plugin": "^0.1.0",
"@graphql-codegen/cli": "^1.21.8",
"@graphql-codegen/fragment-matcher": "^1.17.8",
"@graphql-codegen/typescript": "^1.21.8",
"@graphql-codegen/typescript-graphql-files-modules": "^1.18.1",
"@graphql-codegen/typescript-operations": "^1.17.8",
"@graphql-codegen/cli": "^2.3.1",
"@graphql-codegen/fragment-matcher": "^2.0.0",
"@graphql-codegen/typescript": "^2.0.0",
"@graphql-codegen/typescript-graphql-files-modules": "^2.0.0",
"@graphql-codegen/typescript-operations": "^2.0.0",
"@sentry/cli": "^1.47.1",
"@types/codemirror": "^0.0.72",
"@types/debug": "^4.1.1",
Expand Down
131 changes: 26 additions & 105 deletions packages/app/src/app/graphql/introspection-result.ts
Original file line number Diff line number Diff line change
@@ -1,111 +1,32 @@
export interface IntrospectionResultData {
__schema: {
types: {
kind: string;
name: string;
possibleTypes: {
name: string;
}[];
}[];
export interface PossibleTypesResultData {
possibleTypes: {
[key: string]: string[];
};
}
const result: IntrospectionResultData = {
__schema: {
types: [
{
kind: 'UNION',
name: 'BookmarkEntity',
possibleTypes: [
{
name: 'Team',
},
{
name: 'User',
},
],
},
{
kind: 'UNION',
name: 'Repository',
possibleTypes: [
{
name: 'GitHubRepository',
},
],
},
{
kind: 'UNION',
name: 'ReferenceMetadata',
possibleTypes: [
{
name: 'CodeReferenceMetadata',
},
{
name: 'ImageReferenceMetadata',
},
{
name: 'PreviewReferenceMetadata',
},
{
name: 'UserReferenceMetadata',
},
],
},
{
kind: 'UNION',
name: 'BranchEvent',
possibleTypes: [
{
name: 'PullRequestCommentEvent',
},
{
name: 'PullRequestEvent',
},
{
name: 'PullRequestReviewCommentEvent',
},
{
name: 'PullRequestReviewEvent',
},
],
},
{
kind: 'UNION',
name: 'RepositoryEvent',
possibleTypes: [
{
name: 'InstallationEvent',
},
],
},
{
kind: 'UNION',
name: 'ProjectEvent',
possibleTypes: [
{
name: 'PullRequestCommentEvent',
},
{
name: 'PullRequestEvent',
},
{
name: 'PullRequestReviewCommentEvent',
},
{
name: 'PullRequestReviewEvent',
},
],
},
{
kind: 'UNION',
name: 'TeamEvent',
possibleTypes: [
{
name: 'TeamSubscriptionEvent',
},
],
},
const result: PossibleTypesResultData = {
possibleTypes: {
BookmarkEntity: ['Team', 'User'],
Repository: ['GitHubRepository'],
ReferenceMetadata: [
'CodeReferenceMetadata',
'ImageReferenceMetadata',
'PreviewReferenceMetadata',
'UserReferenceMetadata',
],
BranchEvent: [
'PullRequestCommentEvent',
'PullRequestEvent',
'PullRequestReviewCommentEvent',
'PullRequestReviewEvent',
],
RepositoryEvent: ['InstallationEvent'],
ProjectEvent: [
'PullRequestCommentEvent',
'PullRequestEvent',
'PullRequestReviewCommentEvent',
'PullRequestReviewEvent',
],
TeamEvent: ['TeamSubscriptionEvent'],
},
};
export default result;
Loading

0 comments on commit 8b65a41

Please sign in to comment.