Skip to content

Commit

Permalink
fix(queries): explicitly check for options
Browse files Browse the repository at this point in the history
  • Loading branch information
thesophiaxu committed Feb 28, 2022
1 parent ea99f85 commit 6ff3b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/unigraph-dev-backend/src/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function getFragment(query: Query, states: any) {
: `@recurse${
options?.depth ? `(depth: ${options?.depth})` : ''
} { uid unigraph.id expand(_userpredicate_) }`;
const frag = options.queryFn
const frag = options?.queryFn
? options.queryFn.replace('QUERYFN_TEMPLATE', Array.isArray(uid) ? uid.join(', ') : uid)
: `(func: uid(${Array.isArray(uid) ? uid.join(', ') : uid}))
${queryBody}`;
Expand Down

0 comments on commit 6ff3b72

Please sign in to comment.