Skip to content

The open alternative to Salesforce, designed for AI.

544 B
Raw Blame
import { gql } from 'graphql-tag';
import { type ConfigVariableValue } from 'twenty-shared/types';

export type CreateConfigVariableFactoryInput = {
  key: string;
  value: ConfigVariableValue;
};

export const createConfigVariableQueryFactory = ({
  key,
  value,
}: CreateConfigVariableFactoryInput) => {
  return {
    query: gql`
      mutation CreateDatabaseConfigVariable($key: String!, $value: JSON!) {
        createDatabaseConfigVariable(key: $key, value: $value)
      }
    `,
    variables: {
      key,
      value,
    },
  };
};