Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Specifying Data Source for Query #337

Open
frankfka opened this issue Nov 25, 2022 · 4 comments
Open

Allow Specifying Data Source for Query #337

frankfka opened this issue Nov 25, 2022 · 4 comments

Comments

@frankfka
Copy link

frankfka commented Nov 25, 2022

Hello!

Is it possible to specify the particular data source to query for a given query? I have two graphs with identical schemas. However, for a certain query, I would like to make sure that I'm hitting one particular endpoint.

I assume that this can be done with composition - but can't find an example for doing so.

And in general, is there a good resource to see how to write the .yml file?

@matthewlilley
Copy link

@frankfka you might find something useful within our graph client package here:

https://github.com/sushiswap/sushiswap/blob/master/packages/graph-client/__tests__/pairs.test.ts

We do a lot of multichain queries, and chain specific queries for the same graphs.

@frankfka
Copy link
Author

frankfka commented Dec 5, 2022

@matthewlilley Thanks! Is there a good way to find docs for the yaml file, so that we can actually understand what the configuration does? For example, I couldn't find good documentation for addSourceName: https://github.com/sushiswap/sushiswap/blob/master/packages/graph-client/.graphclientrc.yml#L96

@matthewlilley
Copy link

@matthewlilley Thanks! Is there a good way to find docs for the yaml file, so that we can actually understand what the configuration does? For example, I couldn't find good documentation for addSourceName: https://github.com/sushiswap/sushiswap/blob/master/packages/graph-client/.graphclientrc.yml#L96

For graph client specific packages, probably best to just look at the packages within this repo, the config itself is a graphql mesh config.

https://github.com/Urigo/graphql-mesh/blob/master/packages/types/src/config.ts

@dhruv035
Copy link

I cant find this option either, I would like a query to run only against 1 of the sources in the .yaml file, is there a way to do that with graphclient?

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

No branches or pull requests

3 participants