Hi guys, i want to do some report dynamic construc...
# random
c
Hi guys, i want to do some report dynamic construct using graphql. The user will create the report's structure according his necessity, with operations and, or, etc. My question is, how can I create a query (server) that will consider all the
and's
and
or's
of the request? Trying to clarify a little bit, e.g.:
Copy code
(
name = 'Caio'
OR
name = 'Felipe'
)
AND 
(
age = '25'
OR
age = '30'
)
a
If u have all the variables I like to use template strings
Copy code
query = `
 name = ${name1} 
 OR
 name = ${name2}
etc
U could also "build" the string using a loop and then insert the entire thing as a template literal
c
ok, but how can i map this dynamically to my graphql server. Because I can have something like:
Copy code
(
name = 'Caio'
AND
name = 'Felipe'
)
OR
(
age = '25'
OR
age = '30'
)
So Idk what query the user will create with
OR's
and
AND's
mixed