Skip to content

Latest commit

 

History

History
1261 lines (716 loc) · 52 KB

File metadata and controls

1261 lines (716 loc) · 52 KB

graphql-language-service-cli

3.5.0

Minor Changes

Patch Changes

3.4.2

Patch Changes

  • #3647 ba5720b Thanks @acao! - several LSP fixes and improvements:

    Bugfixes

    debounce schema change events to fix codegen bugs to fix #3622

    on mass file changes, network schema is overfetching because the schema cache is now invalidated on every watched schema file change

    to address this, we debounce the new onSchemaChange event by 400ms

    note that schemaCacheTTL can only be set in extension settings or graphql config at the top level - it will be ignored if configured per-project in the graphql config

    Code Improvements

    • Fixes flaky tests, and schemaCacheTTL setting not being passed to the cache
    • Adds a test to validate network schema changes are reflected in the cache
  • Updated dependencies [ba5720b, fdec377, e2c04c7]:

3.4.1

Patch Changes

3.4.0

Minor Changes

  • #3521 aa6dbbb4 Thanks @acao! - Fix many schema and fragment lifecycle issues, not all of them, but many related to cacheing. Note: this makes cacheSchemaForLookup enabled by default again for schema first contexts.

    This fixes multiple cacheing bugs, upon addomg some in-depth integration test coverage for the LSP server. It also solves several bugs regarding loading config types, and properly restarts the server and invalidates schema when there are config changes.

    Bugfix Summary

    • configurable polling updates for network and other code first schema configuration, set to a 30s interval by default. powered by schemaCacheTTL which can be configured in the IDE settings (vscode, nvim) or in the graphql config file. (1)
    • jump to definition in embedded files offset bug, for both fragments and code files with SDL strings
    • cache invalidation for fragments (fragment lookup/autcoomplete data is more accurate, but incomplete/invalid fragments still do not autocomplete or validate, and remember fragment options always filter/validate by the on type!)
    • schema cache invalidation for schema files - schema updates as you change the SDL files, and the generated file for code first by the schemaCacheTTL setting
    • schema definition lookups & autocomplete crossing over into the wrong project

    Notes

    1. If possible, configuring for your locally running framework or a schema registry client to handle schema updates and output to a schema.graphql or introspection.json will always provide a better experience. many graphql frameworks have this built in! Otherwise, we must use this new lazy polling approach if you provide a url schema (this includes both introspection URLs and remote file URLs, and the combination of these).

    Known Bugs Fixed

    • #3318
    • #2357
    • #3469
    • #2422
    • #2820
    • many more!

    Test Improvements

    • new, high level integration spec suite for the LSP with a matching test utility
    • more unit test coverage
    • total increased test coverage of about 25% in the LSP server codebase.
    • many "happy paths" covered for both schema and code first contexts
    • many bugs revealed (and their source)

    What's next?

    Another stage of the rewrite is already almost ready. This will fix even more bugs and improve memory usage, eliminate redundant parsing and ensure that graphql config's loaders do all of the parsing and heavy lifting, thus honoring all the configs as well. It also significantly reduces the code complexity.

    There is also a plan to match Relay LSP's lookup config for either IDE (vscode, nvm, etc) settings as they provide, or by loading modules into your graphql-config!

Patch Changes

  • #3521 aa6dbbb4 Thanks @acao! - Fixes several issues with Type System (SDL) completion across the ecosystem:

    • restores completion for object and input type fields when the document context is not detectable or parseable
    • correct top-level completions for either of the unknown, type system or executable definitions. this leads to mixed top level completions when the document is unparseable, but now you are not seemingly restricted to only executable top level definitions
    • .graphqls ad-hoc standard functionality remains, but is not required, as it is not part of the official spec, and the spec also allows mixed mode documents in theory, and this concept is required when the type is unknown
  • #3521 aa6dbbb4 Thanks @acao! - Introduce locateCommand based on Relay LSP pathToLocateCommand:

    Now with <graphql config>.extensions.languageService.locateCommand, you can specify either the existing signature for relay, with the same callback parameters and return signature (of a string delimited by : characters), or you can return an object with {uri, range} for the exact set of coordinates for the destination range. the function can be sync or async.

    Relay LSP currently supports Type and Type.field for the 2nd argument. Ours also returns Type.field(argument) as a point of reference. It works with object types, input types, fragments, executable definitions and their fields, and should work for directive definitions as well.

    In the case of unnamed types such as fragment spreads, they return the name of the implemented type currently, but I'm curious what users prefer here. I assumed that some people may want to not be limited to only using this for SDL type definition lookups. Also look soon to see locateCommand support added for symbols, outline, and coming references and implementations.

    The module at the path you specify in relay LSP for pathToLocateCommand should work as such.

    // import it
    import { locateCommand } from './graphql/tooling/lsp/locate.js';
    export default {
      languageService: {
        locateCommand,
      },
    
      projects: {
        a: {
          schema: 'https://localhost:8000/graphql',
          documents: './a/**/*.{ts,tsx,jsx,js,graphql}',
        },
        b: {
          schema: './schema/ascode.ts',
          documents: './b/**/*.{ts,tsx,jsx,js,graphql}',
        },
      },
    };
    // or define it inline
    
    import { type LocateCommand } from 'graphql-language-service-server';
    
    // relay LSP style
    const locateCommand = (projectName: string, typePath: string) => {
      const { path, startLine, endLine } = ourLookupUtility(
        projectName,
        typePath,
      );
      return `${path}:${startLine}:${endLine}`;
    };
    
    // an example with our alternative return signature
    const locateCommand: LocateCommand = (projectName, typePath, info) => {
      // pass more info, such as GraphQLType with the ast node. info.project is also available if you need it
      const { path, range } = ourLookupUtility(
        projectName,
        typePath,
        info.type.node,
      );
      return { uri: path, range }; // range.start.line/range.end.line
    };
    
    export default {
      languageService: {
        locateCommand,
      },
      schema: 'https://localhost:8000/graphql',
      documents: './**/*.{ts,tsx,jsx,js,graphql}',
    };

    Passing a string as a module path to resolve is coming in a follow-up release. Then it can be used with .yml, .toml, .json, package.json#graphql, etc

    For now this was a quick baseline for a feature asked for in multiple channels!

    Let us know how this works, and about any other interoperability improvements between our graphql LSP and other language servers (relay, intellij, etc) used by you and colleauges in your engineering organisations. We are trying our best to keep up with the awesome innovations they have 👀!

  • Updated dependencies [aa6dbbb4, aa6dbbb4, aa6dbbb4]:

3.3.33

Patch Changes

3.3.32

Patch Changes

3.3.31

Patch Changes

3.3.30

Patch Changes

3.3.29

Patch Changes

3.3.28

Patch Changes

3.3.27

Patch Changes

3.3.26

Patch Changes

3.3.25

Patch Changes

3.3.24

Patch Changes

3.3.24-alpha.0

Patch Changes

3.3.23

Patch Changes

3.3.22

Patch Changes

3.3.21

Patch Changes

3.3.20

Patch Changes

3.3.19

Patch Changes

3.3.18

Patch Changes

3.3.17

Patch Changes

3.3.16

Patch Changes

3.3.15

Patch Changes

3.3.14

Patch Changes

3.3.13

Patch Changes

3.3.12

Patch Changes

3.3.11

Patch Changes

3.3.10

Patch Changes

3.3.9

Patch Changes

3.3.8

Patch Changes

3.3.7

Patch Changes

3.3.6

Patch Changes

3.3.5

Patch Changes

  • #2616 b0d7f06c Thanks @acao! - support vscode multi-root workspaces! creates an LSP server instance for each workspace.

    WARNING: large-scale vscode workspaces usage, and this in tandem with graphql.config.* multi-project configs could lead to excessive system resource usage. Optimizations coming soon.

  • Updated dependencies [b0d7f06c]:

3.3.4

Patch Changes

3.3.3

Patch Changes

3.3.2

Patch Changes

  • #2660 34d31fbc Thanks @acao! - bump ts-node to 10.x, so that TypeScript based configs (i.e. .graphqlrc.ts) will continue to work. It also bumps to the latest patch releases of graphql-config fixed several issues with TypeScript loading (v4.3.2, v4.3.3). We tested manually, but please open a bug if you encounter any with schema-as-url configs & schema introspection.

  • Updated dependencies [34d31fbc]:

3.3.1

Patch Changes

3.3.0

Minor Changes

  • #2557 3304606d Thanks @acao! - upgrades the vscode-languageserver and vscode-jsonrpc reference implementations for the lsp server to the latest. also upgrades vscode-languageclient in vscode-graphql to the latest 8.0.1. seems to work fine for IPC in vscode-graphql at least!

    hopefully this solves #2230 once and for all!

Patch Changes

3.2.30

Patch Changes

3.2.29

Patch Changes

  • #2519 de5d5a07 Thanks @acao! - enable graphql-config legacy mode by default in the LSP server

3.2.28

Patch Changes

3.2.27

Patch Changes

3.2.26

Patch Changes

3.2.25

Patch Changes

3.2.24

Patch Changes

3.2.23

Patch Changes

3.2.22

Patch Changes

3.2.21

Patch Changes

3.2.20

Patch Changes

3.2.19

Patch Changes

3.2.18

Patch Changes

  • #2267 fe441272 Thanks @elken! - Re-add graphql-language-service-server as a dep to graphql-language-service-cli

3.2.17

Patch Changes

3.2.16

Patch Changes

3.2.15

Patch Changes

3.2.14

Patch Changes

3.2.13

Patch Changes

3.2.12

Patch Changes

3.2.11

Patch Changes

3.2.10

Patch Changes

3.2.9

Patch Changes

3.2.8

Patch Changes

3.2.7

Patch Changes

3.2.6

Patch Changes

3.2.5

Patch Changes

  • f82bd7a9 #2055 Thanks @acao! - this fixes the URI scheme related bugs and make sure schema as sdl config works again.

    fileURLToPath had been introduced by a contributor and I didn't test properly, it broke sdl file loading!

    definitions, autocomplete, diagnostics, etc should work again also hides the more verbose logging output for now

  • Updated dependencies [f82bd7a9]:

3.2.4

Patch Changes

3.2.3

Patch Changes

3.2.2

Patch Changes

3.2.1

Patch Changes

3.2.0

Minor Changes

Patch Changes

3.1.14

Patch Changes

3.1.13

Patch Changes

  • 6869ce77 #1816 Thanks @acao! - improve peer resolutions for graphql 14 & 15. 14.5.0 minimum is for built-in typescript types, and another method only available in 14.4.0

3.1.12 (2021-01-07)

Note: Version bump only for package graphql-language-service-cli

3.1.11 (2021-01-07)

Note: Version bump only for package graphql-language-service-cli

3.1.10 (2021-01-07)

Note: Version bump only for package graphql-language-service-cli

3.1.9 (2021-01-03)

Note: Version bump only for package graphql-language-service-cli

3.1.8 (2020-12-28)

Note: Version bump only for package graphql-language-service-cli

3.1.7 (2020-12-08)

Note: Version bump only for package graphql-language-service-cli

3.1.6 (2020-11-28)

Note: Version bump only for package graphql-language-service-cli

3.1.5 (2020-10-20)

Note: Version bump only for package graphql-language-service-cli

3.1.4 (2020-09-23)

Note: Version bump only for package graphql-language-service-cli

3.1.3 (2020-09-23)

Note: Version bump only for package graphql-language-service-cli

3.1.2 (2020-09-20)

Note: Version bump only for package graphql-language-service-cli

3.1.1 (2020-09-20)

Note: Version bump only for package graphql-language-service-cli

3.1.0 (2020-09-18)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.5 (2020-09-11)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.4 (2020-08-26)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.3 (2020-08-22)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.2 (2020-08-12)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.1 (2020-08-12)

Note: Version bump only for package graphql-language-service-cli

3.1.0-alpha.0 (2020-08-10)

Bug Fixes

  • pre-caching schema bugs, new server config options (#1636) (d989456)

Features

3.0.1 (2020-08-06)

Note: Version bump only for package graphql-language-service-cli

3.0.0 (2020-06-11)

Note: Version bump only for package graphql-language-service-cli

3.0.0-alpha.5 (2020-06-04)

Note: Version bump only for package graphql-language-service-cli

3.0.0-alpha.4 (2020-06-04)

Bug Fixes

  • cleanup cache entry from lerna publish (4a26218)

3.0.0-alpha.3 (2020-05-28)

Note: Version bump only for package graphql-language-service-cli

3.0.0-alpha.2 (2020-05-19)

Note: Version bump only for package graphql-language-service-cli

2.4.0-alpha.8 (2020-05-17)

Bug Fixes

  • repair CLI, handle all schema and LSP errors (#1482) (992f384)

2.4.0-alpha.7 (2020-04-10)

Note: Version bump only for package graphql-language-service

2.4.0-alpha.6 (2020-04-10)

Note: Version bump only for package graphql-language-service

2.4.0-alpha.5 (2020-04-06)

Features

2.4.0-alpha.4 (2020-04-03)

Note: Version bump only for package graphql-language-service

2.4.0-alpha.3 (2020-03-20)

Note: Version bump only for package graphql-language-service

2.4.0-alpha.2 (2020-03-20)

Bug Fixes

Features

2.4.0-alpha.1 (2020-01-18)

Features

  • convert LSP Server to Typescript, remove watchman (#1138) (8e33dbb)

2.3.4 (2019-12-09)

Note: Version bump only for package graphql-language-service

2.3.3 (2019-12-09)

Note: Version bump only for package graphql-language-service

2.3.2 (2019-12-03)

Note: Version bump only for package graphql-language-service

2.3.1 (2019-11-26)

Note: Version bump only for package graphql-language-service

2.3.0 (2019-10-04)

Features

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

2.2.0 (2019-10-04)

Features

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

2.2.0-alpha.0 (2019-10-04)

Features

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

2.1.1-alpha.1 (2019-09-01)

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

Note: Version bump only for package graphql-language-service

2.1.1-alpha.0 (2019-09-01)

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

Note: Version bump only for package graphql-language-service

2.1.1 (2019-09-01)

2.0.1 (2019-05-14)

2.0.0 (2018-09-18)

1.2.2 (2018-06-11)

1.1.2 (2018-04-19)

1.1.1 (2018-04-18)

1.1.0 (2018-04-09)

1.0.18 (2018-01-04)

1.0.16 (2017-11-21)

1.0.15 (2017-10-02)

0.1.14 (2017-09-29)

0.1.13 (2017-08-24)

0.1.12 (2017-08-21)

0.1.11 (2017-08-20)

0.1.10 (2017-08-19)

0.1.9 (2017-08-18)

0.1.8 (2017-08-18)

0.1.7 (2017-08-16)

0.1.6 (2017-08-15)

0.1.5 (2017-08-14)

0.1.5-0 (2017-08-10)

0.1.4-0 (2017-08-10)

0.1.3-0 (2017-08-10)

0.1.2-0 (2017-08-10)

0.1.1-0 (2017-08-10)

0.1.0-0 (2017-08-10)

Note: Version bump only for package graphql-language-service