Skip to content

The open alternative to Salesforce, designed for AI.

755 B
Raw Blame
import {
  type GraphQLInputObjectType,
  type GraphQLNonNull,
  type GraphQLScalarType,
} from 'graphql';
import {
  type FieldMetadataType,
  type FieldMetadataDefaultValue,
} from 'twenty-shared/types';

import { type GqlInputTypeDefinitionKind } from 'src/engine/api/graphql/workspace-schema-builder/enums/gql-input-type-definition-kind.enum';

export interface ArgMetadata {
  kind?: GqlInputTypeDefinitionKind;
  type?:
    | GraphQLScalarType
    | GraphQLInputObjectType
    | GraphQLNonNull<GraphQLInputObjectType>;
  isNullable?: boolean;
  isArray?: boolean;
  defaultValue?: FieldMetadataDefaultValue<FieldMetadataType>;
}

export interface ArgsMetadata {
  args: {
    [key: string]: ArgMetadata;
  };
  objectMetadataSingularName: string;
}