From 1dc48cf2e582d802575a4a04ca46240a9995a235 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:11:16 +0100 Subject: [PATCH] Version Packages (#183) Co-authored-by: github-actions[bot] --- .changeset/honest-hairs-rule.md | 29 -------------------------- packages/graphqlsp/CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++ packages/graphqlsp/package.json | 2 +- 3 files changed, 37 insertions(+), 30 deletions(-) delete mode 100644 .changeset/honest-hairs-rule.md diff --git a/.changeset/honest-hairs-rule.md b/.changeset/honest-hairs-rule.md deleted file mode 100644 index 8730e89..0000000 --- a/.changeset/honest-hairs-rule.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@0no-co/graphqlsp": patch ---- - -When we have a query like the following - -```graphql -query { - pokemon(id: 1) { id name } - pokemons { id fleeRate } -} -``` - -and we perform - -```ts -const Pokemons = () => { - const [result] = useQuery({ - query: PokemonQuery, - }); - - - return result.data.pokemons.map(pokemon => pokemon.fleeRate) -} -``` - -Then it will see `pokemon` the variable inside our function closure as an -allowed field due to `Query.pokemon` this PR fixes that by refining our search -algorithm to only include valid built paths. diff --git a/packages/graphqlsp/CHANGELOG.md b/packages/graphqlsp/CHANGELOG.md index 1463ba5..c019dbe 100644 --- a/packages/graphqlsp/CHANGELOG.md +++ b/packages/graphqlsp/CHANGELOG.md @@ -1,5 +1,41 @@ # @0no-co/graphqlsp +## 1.0.4 + +### Patch Changes + +- When we have a query like the following + + ```graphql + query { + pokemon(id: 1) { + id + name + } + pokemons { + id + fleeRate + } + } + ``` + + and we perform + + ```ts + const Pokemons = () => { + const [result] = useQuery({ + query: PokemonQuery, + }); + + return result.data.pokemons.map(pokemon => pokemon.fleeRate); + }; + ``` + + Then it will see `pokemon` the variable inside our function closure as an + allowed field due to `Query.pokemon` this PR fixes that by refining our search + algorithm to only include valid built paths. + Submitted by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#182](https://github.com/0no-co/GraphQLSP/pull/182)) + ## 1.0.3 ### Patch Changes diff --git a/packages/graphqlsp/package.json b/packages/graphqlsp/package.json index 400fd50..2a8e396 100644 --- a/packages/graphqlsp/package.json +++ b/packages/graphqlsp/package.json @@ -1,6 +1,6 @@ { "name": "@0no-co/graphqlsp", - "version": "1.0.3", + "version": "1.0.4", "description": "TypeScript LSP plugin that finds GraphQL documents in your code and provides hints and auto-generates types.", "main": "./dist/graphqlsp.js", "module": "./dist/graphqlsp.module.js", -- knotmirror 0.0.1