Skip to content

Programatic graphql config#1272

Closed
zth wants to merge 3 commits intographql:masterfrom
zth:programatic-graphql-config
Closed

Programatic graphql config#1272
zth wants to merge 3 commits intographql:masterfrom
zth:programatic-graphql-config

Conversation

@zth
Copy link
Copy Markdown
Contributor

@zth zth commented Jan 26, 2020

This is a draft of adding a way to supply a pre-existing graphql-config to the LS. The idea is that external consumers, like a vscode extension, should be able to provide defaults and extensions of the existing config (or generate it programatically all together) in a way that can be supplied directly to the LS.

Feedback much welcome!

configDir: Uri,
config?: GraphQLConfig,
): Promise<GraphQLCache> {
const graphQLConfig = config || (await getGraphQLConfig(configDir));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what i was thinking is that if you can pass a config instance here, you might be able to create the graphql-config programatically from an object literal, especially with the new 3.0.0 graphql-config once thats stable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow what you mean. Could you expand a bit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, i'm seeing here where 2.0.0 better suits this need, i was mistaken and thought that 1.2.x supported this too, but i see that this is the only option for now

@acao
Copy link
Copy Markdown
Member

acao commented Feb 16, 2020

@zth we merged the update to 3.0.0 rc 16 so have at it! it will be stable by the time we are. there are a few fantastic new options!

@acao
Copy link
Copy Markdown
Member

acao commented Mar 3, 2020

@zth i think this looks ready, and should work seamlessly with the new graphql-config

@acao acao marked this pull request as ready for review March 3, 2020 02:02
@zth
Copy link
Copy Markdown
Contributor Author

zth commented Mar 3, 2020

@acao do you want me to resolve the last merge conflict, and then it's good to go for merging?

@acao acao mentioned this pull request Mar 13, 2020
9 tasks
@acao
Copy link
Copy Markdown
Member

acao commented Mar 13, 2020

@zth yeah if you could, that would be awesome. would love to pull this into the monaco service effort

@acao
Copy link
Copy Markdown
Member

acao commented Mar 14, 2020

@zth ah, we merged another upstream PR, so a bit more to rebase.

@zth
Copy link
Copy Markdown
Contributor Author

zth commented Mar 17, 2020

#1432 supersedes this.

@zth zth closed this Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants