Files
supabase/apps/docs/resources/reference/referenceCLISchema.ts
Charis 03dcd51700 feat(content api): search result for cli reference (#35488)
## Before

Search results ignored if they are CLI references.

## After

Search results returned for CLI references.
2025-05-06 19:23:40 -04:00

25 lines
856 B
TypeScript

import { GraphQLObjectType, GraphQLString } from 'graphql'
import { GraphQLInterfaceTypeSearchResult } from '../globalSearch/globalSearchSchema'
import { ReferenceCLICommandModel } from './referenceCLIModel'
export const GraphQLObjectTypeReferenceCLICommand = new GraphQLObjectType({
name: 'CLICommandReference',
interfaces: [GraphQLInterfaceTypeSearchResult],
isTypeOf: (value: unknown) => value instanceof ReferenceCLICommandModel,
description: 'A reference document containing a description of a Supabase CLI command',
fields: {
title: {
type: GraphQLString,
description: 'The title of the document',
},
href: {
type: GraphQLString,
description: 'The URL of the document',
},
content: {
type: GraphQLString,
description: 'The content of the reference document, as text',
},
},
})