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

How to write Multi-Query #61

Open
shubhambattoo opened this issue Oct 23, 2023 · 2 comments
Open

How to write Multi-Query #61

shubhambattoo opened this issue Oct 23, 2023 · 2 comments

Comments

@shubhambattoo
Copy link

How to achieve writing Multi-Query?

@GerardPolloRebozado
Copy link

How to achieve writing Multi-Query?

did you discovered how to write it?

@GerardPolloRebozado
Copy link

GerardPolloRebozado commented Aug 29, 2024

How to achieve writing Multi-Query?

did you discovered how to write it?

just discovered how to do it. For example if you want to include genres in your game request you can do it like this:
const gamesQuery = igdb().query('games', 'games-with-genre').fields(['name', 'genres.name']).where(id = ${id}); //here we create a query like every other query except that we dont add the .request const res = await igdb().multi([gamesQuery]).request('/multiquery'); //and here we use the query we have created passing it inside an array to multi() function.

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

2 participants