• Creates a new Query. Accepts template literal inputs.

    Type Parameters

    • T extends QueryValue = any

      The expected type of the response from Fauna when evaluated.

    Parameters

    • queryFragments: readonly string[]

      An array that constitutes the strings that are the basis of the query.

    • Rest...queryArgs: QueryArgument[]

      an Array<QueryValue | Query> that constitute the arguments to inject between the queryFragments.

    Returns Query<T>

    Error - if you call this method directly (not using template literals) and pass invalid construction parameters

     const str = "baz";
    const num = 17;
    const innerQuery = fql`${num} + 3)`;
    const queryRequestBuilder = fql`${str}.length == ${innerQuery}`;