Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support users embedding fql snippets in objects and arrays #272

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
fix docs
  • Loading branch information
ptpaterson committed Jun 12, 2024
commit 1d4da7f378c06cf49c26726dfc097c4f7956c133
9 changes: 3 additions & 6 deletions src/query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,16 @@ export class Query {
}

/**
* Converts this Query to a {@link QueryRequest} you can send
* Converts this Query to an {@link FQLFragment} you can send
* to Fauna.
* @param options - optional {@link QueryOptions} to include
* in the request (and thus override the defaults in your {@link ClientConfiguration}.
* If not passed in, no headers will be set as overrides.
* @returns a {@link QueryRequest}.
* @returns a {@link FQLFragment}.
* @example
* ```typescript
* const num = 8;
* const queryBuilder = fql`'foo'.length == ${num}`;
* const queryRequest = queryBuilder.toQuery();
* // produces:
* { query: { fql: ["'foo'.length == ", { value: { "@int": "8" } }, ""] }}
* { fql: ["'foo'.length == ", { value: { "@int": "8" } }, ""] }
* ```
*/
encode(): FQLFragment {
Expand Down