basically programmatically multiplicate the follow...
# orm-help
v
basically programmatically multiplicate the following query:
Copy code
query getGroups($auth: [GroupAuth!]!) {
  id1: group(auth: $auth[0]) {
    id
  }
  id2: group(auth: $auth[1]) {
    id
  }
}
n
I'm not sure I understand your question, but can't you use a filter like
id_in
in Prisma Client? (I'm assuming you're using Prisma)
v
@nuno I'm not using prisma, but it doesn't matter. This is clientside things.
The problem I have is that if I make a
groups
query that gets all groups, if it fails at getting one group everything will fail. I would like to make it only fail on the ones that fail, hence me trying to generate a query with each separatly
n
Looks like it fails in the server, so it's a server issue?
Maybe you should use Prisma 😉
v
@nuno Using Prisma won't change anything 🤦 I'm asking how to make my schema/how to send a query where even if one
group
fails to load, not all of them will.
Can somebody help me? This is a blocking issue for my project 😞
j
fix it in your resolvers. make each orm query and only return the ones that passed
v
@Jared but then how do I figure out what failed?
j
hit them one at a time, and catch the error
if no error, push it to a result array
it'll depend on what frameworks you are using
v
I'm using vue-apollo
it makes no sense to hit them one at a time, that's the reason I migrated from REST
j
what orm are you using?
v
knex
not an orm
j
you might be able to get something from their slack or forum. I think your problem is there
v
It's not there..
It's about the query
I need to send different queries because if I send just one, when it fails all of them fail
so I need to separate each group to one query
but I don't know how