You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my model I have vertices AccountVertex, UserVertex and InviteVertex representing accounts, users of those accounts and invites those users created to invite other users.
For edges I have:
OwnsUser going from account to user to represent that this is a user of the account
SentInvite going from user to invite to represent that this invite was sent from a user
Invited going from an invite to a user showing that this user has been invited by this particular invite
I am trying to query all users and the invites that they were invited from. Note that some users might not have been created through invites and only have the account -> OwnsUser relationship initially.
The raw query above is returning me the account vertices of accounts which were not created by invites and also both account vertices and the invite that they were invited from in case they were created through an invite. This is exactly what I want.
However I am having trouble writing the Gremlinq query for that. I have tried this, but it does not compile:
I am not sure this is the best way to do this query and I am open to suggestions. From what I understand this does not compile because the .Optional method returns the same type as the query before the .Optional call, but in this case the return might actually be different.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In my model I have vertices AccountVertex, UserVertex and InviteVertex representing accounts, users of those accounts and invites those users created to invite other users.
For edges I have:
I am trying to query all users and the invites that they were invited from. Note that some users might not have been created through invites and only have the account -> OwnsUser relationship initially.
The raw query above is returning me the account vertices of accounts which were not created by invites and also both account vertices and the invite that they were invited from in case they were created through an invite. This is exactly what I want.
However I am having trouble writing the Gremlinq query for that. I have tried this, but it does not compile:
I am not sure this is the best way to do this query and I am open to suggestions. From what I understand this does not compile because the .Optional method returns the same type as the query before the .Optional call, but in this case the return might actually be different.
Can someone help me?
Beta Was this translation helpful? Give feedback.
All reactions