I have the following super simple graph: 
What I'm trying to do is:
- Select all questions that have a property in the firstQuestion question document with a value of true.
- Select any options related to the question using the outgoing edge of type with_options
The following query works, however it seems that there should be a better way to check the edge type without using string operations - in particular, the concatenation operation that I use to recreate the value of edge _id by combining it with the key with the edge type I want - this is the best way check the type of rib?
FOR question IN questions
FILTER question.firstQuestion == true
let options =
(FOR v, e IN 1..1 OUTBOUND question._id GRAPH 'mygraph'
FILTER CONCAT('with_options/', e._key) == e._id
RETURN v)
RETURN {question: question, options: options}
source
share