question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC][LSP] Pluggable schema loading

See original GitHub issue

Hi all,

Here at FB we have some schema extensions that live in a separate file and are applied during the build. While this is not particularly relevant for GraphiQL, we really want to have this as part of the LSP. Therefore I propose the following:

  • In the configuration of the LSP (.graphqlrc), the user can specify the following:
    • (required) a package that provides two functions: async init() and async getSchema(). The latter returns the latest GraphQLSchema. Hopefully this can work in a similar way to babel plugins or webpack loaders.
    • (optional) arguments that are provided to the init function, before the getSchema function is called for the first time.
    • (optional) a glob relative to the .graphqlrc that triggers the schema to be reloaded on file change.

With this, I believe we can provide a very flexible schema loading experience. The first schema loaders we implement should probably be: a file schema loader to provide the current LSP experience and an introspection query schema loader to make it work with GraphiQL.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
acaocommented, Aug 19, 2019

The interface that the typescript language service uses for adding LSP plugins is interesting, and is designed to work in browsers, vscode, monaco, etc https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

We could do something similar with -interface, or possibly a layer on top of it designed for greater parity with existing vscode-<language>-languageservice implementations

1reaction
acaocommented, Jul 18, 2019

Also, I wouldn’t rule out alternative schema loading patterns, even alternative protocols being more readily supported for graphiql-1.0.0-alpha if that matters. for example, using wss to locally (or over the wire?) transmit json-rpc from a language server. so hopefully we can be a good reference implementation of these possibilities

Read more comments on GitHub >

github_iconTop Results From Across the Web

CREATE PLUGGABLE DATABASE
Purpose. Use the CREATE PLUGGABLE DATABASE statement to create a pluggable database (PDB). This statement enables you to perform the following tasks:.
Read more >
Pluggable Database (PDB) Data Import tips
* Run the shell following shell script (imps8c1pdb.sh). The script connect to the pluggable database - S8C1PDB creates the database schema OSM$REPAPI, creates ......
Read more >
Plugging In Oracle Database 12c Pluggable ... - YouTube
This Webinar discusses Oracle Database 12c new feature, Pluggable DatabasesView all of Redgate's Oracle Webinars at ...
Read more >
Install Sample Schemas - ORACLE-BASE
Connect to the pluggable database as the SYSTEM user. sqlplus system/SystemPassword1@pdb1. Load the sample schemas.
Read more >
Database links within pluggable databases
Sometimes, you might need a database link between 2 schemas within the same (pluggable) database. Why? There are several reasons.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found