polen
Version:
A framework for delightful GraphQL developer portals
14 lines • 1.19 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Code } from '@radix-ui/themes';
import { ChangeBase } from '../ChangeBase.js';
export const SchemaRootType = ({ change }) => {
switch (change.type) {
case `SCHEMA_QUERY_TYPE_CHANGED`:
return (_jsxs(ChangeBase, { change: change, children: ["Schema query root type changed from ", _jsx(Code, { children: change.meta.oldQueryTypeName }), " to", ' ', _jsx(Code, { children: change.meta.newQueryTypeName })] }));
case `SCHEMA_MUTATION_TYPE_CHANGED`:
return (_jsxs(ChangeBase, { change: change, children: ["Schema mutation root type changed from ", _jsx(Code, { children: change.meta.oldMutationTypeName || `null` }), " to", ' ', _jsx(Code, { children: change.meta.newMutationTypeName || `null` })] }));
case `SCHEMA_SUBSCRIPTION_TYPE_CHANGED`:
return (_jsxs(ChangeBase, { change: change, children: ["Schema subscription root type changed from ", _jsx(Code, { children: change.meta.oldSubscriptionTypeName || `null` }), " to", ' ', _jsx(Code, { children: change.meta.newSubscriptionTypeName || `null` })] }));
}
};
//# sourceMappingURL=SchemaRootType.js.map