import type { GraphqlChange } from '#lib/graphql-change/index'
import { Code } from '@radix-ui/themes'
import type React from 'react'
import { ChangeBase } from '../ChangeBase.js'
export const SchemaRootType: React.FC<{ change: GraphqlChange.Group.SchemaRootType }> = ({ change }) => {
switch (change.type) {
case `SCHEMA_QUERY_TYPE_CHANGED`:
return (
Schema query root type changed from {change.meta.oldQueryTypeName} to{' '}
{change.meta.newQueryTypeName}
)
case `SCHEMA_MUTATION_TYPE_CHANGED`:
return (
Schema mutation root type changed from {change.meta.oldMutationTypeName || `null`} to{' '}
{change.meta.newMutationTypeName || `null`}
)
case `SCHEMA_SUBSCRIPTION_TYPE_CHANGED`:
return (
Schema subscription root type changed from {change.meta.oldSubscriptionTypeName || `null`} to
{' '}
{change.meta.newSubscriptionTypeName || `null`}
)
}
}