Validate `graphql-config` using `vscode-graphql` and the available schema json
This is just a few lines of code!
https://raw.githubusercontent.com/kamilkisiela/graphql-config/master/config-schema.json https://code.visualstudio.com/Docs/languages/json#_mapping-a-schema-in-an-extension
I feel like if I write anything more about it, I'll officially have had spent more time planning this than implementing it as usual 😆
CC @dotansimha , @dotansimha and @kamilkisiela! this is a quick easy win I have planned, just so it's on your radar
CC @dotansimha and @dotansimha
I was thinking of even suggesting it as a standalone extension. Then folks can use it without vscode-graphql, and say with the standalone vscode syntax extension we just released, and graphql-eslint, whatever works for folks! 🤷🏻♀️
CC @B2o5T as well of course haha!
perhaps there could be a thin client to a say, GraphQL.graphql-config extension, (or if you want to publish it yourselves and we can depend on it), where we do a bit of user-driven validation messaging as well perhaps?
as you may know, we have a graphql-config namespace in settings already staked out for you for vscode haha! there is graphql-config.load.baseDir and legacy and other parameters for loadConfig, and other settings iirc
another thing to consider is that we have extensions that want to load graphql for query exection/etc, and many more in userland who are looking to load graphql-config, so we could make a shared interface for that that wraps loadConfig with logic for common vscode extension client validation notifications/etc that you only see once no matter how many of these extensions that use the graphql-config vscode extensions you are running
also noting this is only for .json, but here is one lead for .yaml:
https://github.com/redhat-developer/vscode-yaml#extension-settings
there are ways we could also just handle actual graphql-config validation messages as notifications on editor or save regardless of the format. to use graphql-config, itself, then errors would need to come back with positional metadata for where the error occurred in the file