[RFC][LSP] Pluggable schema loading
See original GitHub issueHi 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()
andasync 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 thegetSchema
function is called for the first time. - (optional) a glob relative to the
.graphqlrc
that triggers the schema to be reloaded on file change.
- (required) a package that provides two functions:
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:
- Created 4 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 existingvscode-<language>-languageservice
implementationsAlso, 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