/**
 * GraphQL tagged template literal helper.
 *
 * ⚠️ AUTO-GENERATED BY PRISM - DO NOT EDIT
 *
 * This provides a simple passthrough for GraphQL queries.
 * For full type safety, consider using GraphQL Code Generator.
 */

/**
 * Tagged template literal for GraphQL operations.
 * Returns the query string as-is for use with urql/Apollo.
 *
 * Supports both tagged template literal syntax:
 *   graphql`query { ... }`
 *
 * And regular function calls (for compatibility):
 *   graphql(`query { ... }`)
 */
export function graphql(
  strings: TemplateStringsArray | string,
  ...values: unknown[]
): string {
  // Handle regular function call with string argument
  if (typeof strings === 'string') {
    return strings;
  }

  // Handle tagged template literal
  return strings.reduce((result, str, i) => {
    return result + str + (values[i] ?? '');
  }, '');
}

/**
 * Alias for graphql function (common naming convention).
 */
export const gql = graphql;

export default graphql;
