@0no-co/graphqlsp#
1.12.4#
Patch Changes#
- ⚠️ Fix fragments not being resolved when they're assigned to a property on an arbitrary identifier as an identifier Submitted by @kitten (See #322)
1.12.3#
Patch Changes#
- Remove unused
node-fetchdependency Submitted by @kitten (See #318) - Support finding
graphql()invocations within call-expressions Submitted by @JoviDeCroock (See #319) - Upgrade
@gql.tada/internalto^1.0.0Submitted by @kitten (See #317)
1.12.2#
Patch Changes#
- Update
graphqlto variably support^15.5.0and include future support for v17. Thegraphqlpackage is now marked as a peer dependency in addition to a regular dependency Submitted by @kitten (See #314)
1.12.1#
Patch Changes#
- ⚠️ Fix schema name being determined incorrectly when calling
graphqlfrom namespace/property-access Submitted by @kitten (See #312)
1.12.0#
Minor Changes#
- Add support for defining multiple indepenent schemas through a new config property called
schemas, you can pass a config like the following:
The LSP will depending on what{ "name": "@0no-co/graphqlsp", "schemas": [ { "name": "pokemons", "schema": "./pokemons.graphql", "tadaOutputLocation": "./pokemons-introspection.d.ts" }, { "name": "weather", "schema": "./weather.graphql", "tadaOutputLocation": "./weather-introspection.d.ts" } ] }graphql()template you use figure out what API you are reaching out to. Submitted by @JoviDeCroock (See #303) - Expose
findAllCallExpressionson@0no-co/graphqlsp/apiSubmitted by @kitten (See #308) - Expand support for
gql.tadaAPI. GraphQLSP will now recognizegraphql()/graphql.persisted()calls regardless of variable naming and support more obscure usage patterns Submitted by @kitten (See #309)
1.11.0#
Minor Changes#
- Add validation step to check that the persisted-operations hash has been updated when the document changes Submitted by @JoviDeCroock (See #301)
1.10.3#
Patch Changes#
- Correctly identify unused fields on a fragment-definition, these have no parent to group by so we display them as unused leaves Submitted by @JoviDeCroock (See #299)
1.10.2#
Patch Changes#
- ⚠️ Fix crash due to typeArguments being undefined Submitted by @JoviDeCroock (See #297)
1.10.1#
Patch Changes#
- switch error message for missing operation-name to not allude to typegen Submitted by @JoviDeCroock (See #290)
- Swap-write introspection file instead of overwriting it directly Submitted by @kitten (See #291)
- ⚠️ Fix directives being misreported due to globally declared regex maintaining state Submitted by @JoviDeCroock (See #293)
1.10.0#
Minor Changes#
- Support passing GraphQL documents by value to
graphql.persisted’s second argument Submitted by @JoviDeCroock (See #287)
1.9.1#
Patch Changes#
- Add internal helper to unroll tada fragments Submitted by @JoviDeCroock (See #285)
1.9.0#
Minor Changes#
- Add support for
graphql.persistedhttps://github.com/0no-co/GraphQLSP/pull/240 Submitted by @JoviDeCroock (See9210406)
Patch Changes#
- Expose persisted helper to translate typeQuery to the corresponding document Submitted by @JoviDeCroock (See #284)
1.8.0#
Minor Changes#
- Expose the
initandgetGraphQLDiagnosticsmethods Submitted by @JoviDeCroock (See #279)
Patch Changes#
1.7.1#
Patch Changes#
1.7.0#
Minor Changes#
- Introduce option to pre-process the introspection file, this improves the performance of
gql.tada. This will be enabled by default and can be turned off by leveragingtadaDisablePreprocessing: truein thetsconfigSubmitted by @JoviDeCroock (See #273)
1.6.1#
Patch Changes#
- ⚠️ Fix case where our fragments is an empty array Submitted by @JoviDeCroock (See #271)
1.6.0#
Minor Changes#
- Leverage
require.resolvewhen followingtsconfig.extendsso we supportnode_modulesSubmitted by @JoviDeCroock (See #266)
1.5.1#
Patch Changes#
- ⚠️ Fix type-condition suggestions Submitted by @JoviDeCroock (See #262)
1.5.0#
Minor Changes#
- Add a bail for
fieldUsagewhere we return a property from a function Submitted by @JoviDeCroock (See #260)
Patch Changes#
- Bubble up unused fields to their closest parent Submitted by @JoviDeCroock (See #258)
1.4.3#
Patch Changes#
- Add support for alternative root directories, when your tsconfig does not define GraphQLSP we'll traverse up until we find the
extendsthat does and resolve the schema from there Submitted by @JoviDeCroock (See #257) - Change
setIntervaltosetTimeoutSubmitted by @JoviDeCroock (See #255)
1.4.2#
Patch Changes#
- ⚠️ fix case where the hover-information would target the wrong TypeScript node by one character Submitted by @llllvvuu (See #244)
- Update ESM build output to be written to a
.mjsfile extension rather than.jsSubmitted by @kitten (See #250)
1.4.1#
Patch Changes#
- ⚠️ Fix unused fields detection not respecting field aliases in GraphQL documents Submitted by @kitten (See #238)
1.4.0#
Minor Changes#
- Expand support of tracking field usage to more edge cases by matching a defined GraphQL document’s type against variables in-scope with said type Submitted by @kitten (See #235)
Patch Changes#
- Only warn for fragments that are exported Submitted by @JoviDeCroock (See #230)
- ⚠️ Fix issue where a missing argument 2 for a call-expression would make us erase prior found fragment-definitions Submitted by @JoviDeCroock (See #233)
1.3.5#
Patch Changes#
- Add bail for field-usage when we can't find anything Submitted by @JoviDeCroock (See #226)
1.3.4#
Patch Changes#
- ⚠️ Fix offset issue when using the graphql annotation Submitted by @JoviDeCroock (See #217)
- Add more built-in urql directives Submitted by @JoviDeCroock (See #218)
1.3.3#
Patch Changes#
- minor fix to avoid error message in the logs Submitted by @JoviDeCroock (See #214)
1.3.2#
Patch Changes#
- ⚠️ fix broken positioning on unix Submitted by @JoviDeCroock (See #209)
1.3.1#
Patch Changes#
- ⚠️ Fix case for call-expression where index would go out of bounds due to fragments being external to the document. In tagged-templates we resolve this by adding it in to the original text Submitted by @JoviDeCroock (See #207)
1.3.0#
Minor Changes#
- Support array destructuring result lists Submitted by @JoviDeCroock (See #204)
1.2.0#
Minor Changes#
- support property assignment/objectAccessPattern Submitted by @JoviDeCroock (See #202)
1.1.2#
Patch Changes#
- Automatically disable Prettier and ESLint on
tadaOutputLocationoutput files Submitted by @kitten (See #199)
1.1.1#
Patch Changes#
1.1.0#
Minor Changes#
- Add way to provide additional reserved keys for field-usage tracking by means of the
reservedKeysconfig property which accepts an array of strings Submitted by @JoviDeCroock (See #195)
1.0.7#
Patch Changes#
- Avoid bailing out of the cache for identical introspections Submitted by @JoviDeCroock (See #193)
- Account for empty lines when asking for completions Submitted by @JoviDeCroock (See #191)
1.0.6#
Patch Changes#
- Catch errors in field-usage as we have been seeing TS fail to resolve references Submitted by @JoviDeCroock (See #188)
1.0.5#
Patch Changes#
- When creating a
d.tsfile, export the introspection type to make it reusable Submitted by @kitten (See #184) - Upgrade to
@urql/introspection@1.0.3Submitted by @kitten (See #185)
1.0.4#
Patch Changes#
-
When we have a query like the following
query { pokemon(id: 1) { id name } pokemons { id fleeRate } }and we perform
const Pokemons = () => { const [result] = useQuery({ query: PokemonQuery, }); return result.data.pokemons.map(pokemon => pokemon.fleeRate); };Then it will see
pokemonthe variable inside our function closure as an allowed field due toQuery.pokemonthis PR fixes that by refining our search algorithm to only include valid built paths. Submitted by @JoviDeCroock (See #182)
1.0.3#
Patch Changes#
- Stop caching diagnostics for fragment imports and field-usage as these can be controlled externally Submitted by @JoviDeCroock (See #174)
- Add fix for nonNullAssertion and using Array.at Submitted by @JoviDeCroock (See #177)
1.0.2#
Patch Changes#
- Use
@0no-co/graphql.webfor bettervisitperf Submitted by @JoviDeCroock (See #172)
1.0.1#
Patch Changes#
- Ensure we track usage across all references Submitted by @JoviDeCroock (See #170)
1.0.0#
Major Changes#
- Look for
gqlandgraphqlby default as well as change the default for call-expressions to true. If you are using TaggedTemplateExpressions you can migrate by adding the following to your tsconfig file
Submitted by @JoviDeCroock (See #162){ "plugins": [ { "name": "@0no-co/graphqlsp", "schema": "...", "templateIsCallExpression": false } ] } - Retire automatic typegen with tagged-templates, we encourage folks to either try out gql.tada or the client-preset Submitted by @JoviDeCroock (See #148)
- Remove
fragment-checkingfrom tagged-templates due to issues with barrel-file exports and flip defaults for field usage and import tracking with call-expressions Submitted by @JoviDeCroock (See #166)
Minor Changes#
- Add option named
tadaOutputLocationto automatically write theintrospection.tsfile Submitted by @JoviDeCroock (See #165) - Update build process to output typings and to bundle more dependencies Submitted by @kitten (See #167)
- Use
tsnamespace passed to plugin by TypeScript instance, rather than re-requiring/importing it Submitted by @kitten (See #167) - Allow
tadaOutputLocationto contain filename targets and switch between a.d.tsand.tsoutput mode Submitted by @kitten (See #169)
0.15.0#
Minor Changes#
- Make the LSP work with
gql.tadaSubmitted by @JoviDeCroock (See #160)
0.14.1#
Patch Changes#
- Check whether we are on the correct template tag Submitted by @JoviDeCroock (See #157)
0.14.0#
Minor Changes#
- Warn when an import defines a fragment that is unused in the current file Submitted by @JoviDeCroock (See #152)
0.13.0#
Minor Changes#
- Track field usage and warn when a field goes unused Submitted by @JoviDeCroock (See #146)
Patch Changes#
- Adjust documentation display Submitted by @JoviDeCroock (See #126)
0.12.1#
Patch Changes#
- Upgrade TypeScript dependency, this would normally not result in a changeset but it had us remove the normal auto-complete and quick-info and only do that logic when ours ends up in no results Submitted by @JoviDeCroock (See #136)
- Don't error on known client-side directives Submitted by @JoviDeCroock (See #144)
0.12.0#
Minor Changes#
- Use our internal suggestions algo for better arugments and spread-suggestions Submitted by @JoviDeCroock (See #132)
Patch Changes#
- Add fragments to the cache-key when using call-expressions Submitted by @JoviDeCroock (See #134)
0.11.2#
Patch Changes#
- ⚠️ Fix crash during fragment aggregation step Submitted by @JoviDeCroock (See #119)
0.11.1#
Patch Changes#
- Poll schema every minute Submitted by @JoviDeCroock (See #112)
0.11.0#
Minor Changes#
- Support the GraphQL Code Generator client preset Submitted by @JoviDeCroock (See #109)
0.10.1#
Patch Changes#
- Resolve parsed AST nodes being interpolated into an operation Submitted by @JoviDeCroock (See #105)
- add caching for gql-diagnostics Submitted by @JoviDeCroock (See #104)
- Correctly bail when file has typescript errors Submitted by @JoviDeCroock (See #107)
0.10.0#
Minor Changes#
- Change default config to not check for co-located fragments by default Submitted by @JoviDeCroock (See #99)
Patch Changes#
- Prevent duplicate async file-generation processes from happening Submitted by @JoviDeCroock (See #100)
0.9.2#
Patch Changes#
- ⚠️ Fix setting
shouldCheckForColocatedFragmentstofalsefalling back totrueSubmitted by @dan-lee (See #96)
0.9.1#
Patch Changes#
- Catch expression statements Submitted by @JoviDeCroock (See #94)
0.9.0#
Minor Changes#
- Add missing dependencies Submitted by @JoviDeCroock (See #91)
0.8.0#
Minor Changes#
- Allow specifying headers for fetching the introspection Submitted by @JoviDeCroock (See #87)
Patch Changes#
- Guard against no schema or errored codegen attempts Submitted by @JoviDeCroock (See #89)
- catch more schema errors and improve logging Submitted by @JoviDeCroock (See #84)
0.7.4#
Patch Changes#
- Correctly replace with identical replacement strings Submitted by @JoviDeCroock (See #82)
- Account for offsets in auto-complete as well Submitted by @JoviDeCroock (See #81)
- ⚠️ Fix quick-info getting offset by preceding fragments Submitted by @JoviDeCroock (See #78)
0.7.3#
Patch Changes#
- Avoid polluting with diagnostics not in current file Submitted by @JoviDeCroock (See #73)
0.7.2#
Patch Changes#
- ⚠️ Fix multiple selection-set updates Submitted by @JoviDeCroock (See #69)
0.7.1#
Patch Changes#
- ⚠️ Fix forgotten typegen Submitted by @JoviDeCroock (See #67)
0.7.0#
Minor Changes#
- Add option to disable type-generation Submitted by @JoviDeCroock (See #64)
0.6.2#
Patch Changes#
- ⚠️ Fix extra types Submitted by @JoviDeCroock (See #62)
0.6.1#
Patch Changes#
- Add
nonOptionalTypename: trueas this allows for easier type matching Submitted by @JoviDeCroock (See #60)
0.6.0#
Minor Changes#
- Add new option named
extraTypeswhich can be used to define an additional set of types to help with thescalardefinitions Submitted by @JoviDeCroock (See #58) - Change
avoidOptionalsto false in the base type generation Submitted by @JoviDeCroock (See #58)
0.5.2#
Patch Changes#
- dont perform file additions when we have ts-errors Submitted by @JoviDeCroock (See #56)
0.5.1#
Patch Changes#
- First perform the graphqlsp operations and only after do the TypeScript ones, this to account for changed lines from semantic-diagnostics Submitted by @JoviDeCroock (See #53)
0.5.0#
Minor Changes#
- Do not suggest fields/fragments/input vars that are already present Submitted by @TheMightyPenguin (See #48)
0.4.2#
Patch Changes#
- publish with provenance Submitted by @JoviDeCroock (See #49)
0.4.1#
Patch Changes#
- Optimise parse performance by omitting location information
Submitted by @JoviDeCroock (See
660235e) - Improve the error-codes so they become discernible
Submitted by @JoviDeCroock (See
8f3de11)
0.4.0#
Minor Changes#
- Add a
messagediagnostic when we see an import from a file that hasfragmentexports we'll warn you when they are not imported, this because of the assumption that to use this file one would have to adhere to the data requirements of said file. You can choose to disable this setting by settingshouldCheckForColocatedFragmentstofalseSubmitted by @JoviDeCroock (See #42)
0.3.0#
Minor Changes#
- only run the
typescriptplugin once to generate a set of types that we'll reference from ourtypescript-operations, this to reduce lengthy generated files Submitted by @JoviDeCroock (See #39)
0.2.1#
Patch Changes#
- Bump the graphql-code-generator and graphiql-utils dependencies Submitted by @JoviDeCroock (See #35)
0.2.0#
Minor Changes#
- Add ability to specify a URL for your schema, GraphQLSP will then fetch the introspection from the specified URL Submitted by @JoviDeCroock (See #26)
- Display some documentation alongside fields and fragments, for fields it will show the documentation or the type and for fragmentSpreads the typeCondition will be displayed Submitted by @JoviDeCroock (See #31)
Patch Changes#
- Check the
dirtystate of the file an additional time to prevent writing to the file when the user types directly after saving Submitted by @JoviDeCroock (See #27) - Enforce the correct type on FragmentSpread suggestions Submitted by @JoviDeCroock (See #32)