Skip to content

Commit

Permalink
chore: bump dependencies (#35)
Browse files Browse the repository at this point in the history
* bump dependencies

* try in example
  • Loading branch information
JoviDeCroock authored Apr 16, 2023
1 parent d5a225f commit 7b8a67f
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 134 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"commit": false,
"access": "public",
"baseBranch": "main",
"ignore": ["example"]
"ignore": ["example", "fixtures"]
}
5 changes: 5 additions & 0 deletions .changeset/metal-carrots-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@0no-co/graphqlsp': patch
---

Bump the graphql-code-generator and graphiql-utils dependencies
2 changes: 2 additions & 0 deletions packages/example/src/Pokemon.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export type QueryPokemonArgs = {
export type FieldsFragment = {
__typename?: 'Pokemon';
classification?: string | null;
id: string;
};

export type PokemonFieldsFragment = {
Expand All @@ -130,6 +131,7 @@ export const FieldsFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'classification' } },
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
],
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/example/src/Pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { gql } from '@urql/core';
export const fields = gql`
fragment fields on Pokemon {
classification
id
}
` as typeof import('./Pokemon.generated').FieldsFragmentDoc;

Expand Down
46 changes: 43 additions & 3 deletions packages/example/src/index.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export type PokemonsQuery = {
__typename: 'Pokemon';
id: string;
name: string;
fleeRate?: number | null;
} | null> | null;
};

Expand All @@ -128,7 +129,12 @@ export type PokemonQueryVariables = Exact<{

export type PokemonQuery = {
__typename?: 'Query';
pokemon?: { __typename: 'Pokemon'; id: string; name: string } | null;
pokemon?: {
__typename: 'Pokemon';
id: string;
fleeRate?: number | null;
name: string;
} | null;
};

export const PokemonFieldsFragmentDoc = {
Expand Down Expand Up @@ -170,6 +176,7 @@ export const PokemonsDocument = {
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'fleeRate' } },
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'pokemonFields' },
Expand All @@ -180,7 +187,21 @@ export const PokemonsDocument = {
],
},
},
...PokemonFieldsFragmentDoc.definitions,
{
kind: 'FragmentDefinition',
name: { kind: 'Name', value: 'pokemonFields' },
typeCondition: {
kind: 'NamedType',
name: { kind: 'Name', value: 'Pokemon' },
},
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
],
},
},
],
} as unknown as DocumentNode<PokemonsQuery, PokemonsQueryVariables>;
export const PokemonDocument = {
Expand Down Expand Up @@ -220,13 +241,32 @@ export const PokemonDocument = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
{ kind: 'Field', name: { kind: 'Name', value: 'fleeRate' } },
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'pokemonFields' },
},
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
],
},
},
],
},
},
{
kind: 'FragmentDefinition',
name: { kind: 'Name', value: 'pokemonFields' },
typeCondition: {
kind: 'NamedType',
name: { kind: 'Name', value: 'Pokemon' },
},
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
],
},
},
],
} as unknown as DocumentNode<PokemonQuery, PokemonQueryVariables>;
7 changes: 5 additions & 2 deletions packages/example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PokemonsQuery = gql`
id
name
__typename
fleeRate
...pokemonFields
}
}
Expand All @@ -30,10 +30,13 @@ const PokemonQuery = gql`
query Pokemon($id: ID!) {
pokemon(id: $id) {
id
name
fleeRate
...pokemonFields
__typename
}
}
${PokemonFields}
` as typeof import('./index.generated').PokemonDocument;

client
Expand Down
19 changes: 5 additions & 14 deletions packages/graphqlsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,17 @@
"*.{js,ts,json,md}": "prettier --write"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@changesets/get-github-info": "^0.5.2",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.0",
"@types/node": "^18.15.11",
"@types/node-fetch": "^2.6.3",
"dotenv": "^16.0.3",
"graphql": "^16.6.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.1",
"prettier": "^2.8.7",
"rollup": "^3.20.2",
"typescript": "^5.0.0"
},
"dependencies": {
"@graphql-codegen/core": "^2.6.8",
"@graphql-codegen/typed-document-node": "^2.3.10",
"@graphql-codegen/typescript": "^2.8.5",
"@graphql-codegen/typescript-operations": "^2.5.10",
"graphql-language-service": "^5.0.6",
"@graphql-codegen/core": "^3.1.0",
"@graphql-codegen/typed-document-node": "^3.0.2",
"@graphql-codegen/typescript": "^3.0.3",
"@graphql-codegen/typescript-operations": "^3.0.3",
"graphql-language-service": "^5.1.3",
"node-fetch": "^2.0.0"
}
}
Loading

0 comments on commit 7b8a67f

Please sign in to comment.