Separate system operations from core objects in GraphQL endpoints (#12977)
Moves system-level operations (auth, billing, admin) to use the /metadata endpoint instead of /graphql. This cleans up the endpoint separation so /graphql is purely for core objects (Company, People, etc.) and /metadata handles all system operations. Part of prep work for webhook/API key core migration.
This commit is contained in:
+1
-5
@@ -10,21 +10,17 @@ import { CREATE_ONE_OBJECT_METADATA_ITEM } from '../graphql/mutations';
|
||||
|
||||
import { useRefreshObjectMetadataItems } from '@/object-metadata/hooks/useRefreshObjectMetadataItem';
|
||||
import { useRefreshCachedViews } from '@/views/hooks/useRefreshViews';
|
||||
import { useApolloMetadataClient } from './useApolloMetadataClient';
|
||||
|
||||
export const useCreateOneObjectMetadataItem = () => {
|
||||
const { refreshCachedViews } = useRefreshCachedViews();
|
||||
|
||||
const apolloMetadataClient = useApolloMetadataClient();
|
||||
const { refreshObjectMetadataItems } =
|
||||
useRefreshObjectMetadataItems('network-only');
|
||||
|
||||
const [mutate] = useMutation<
|
||||
CreateOneObjectMetadataItemMutation,
|
||||
CreateOneObjectMetadataItemMutationVariables
|
||||
>(CREATE_ONE_OBJECT_METADATA_ITEM, {
|
||||
client: apolloMetadataClient,
|
||||
});
|
||||
>(CREATE_ONE_OBJECT_METADATA_ITEM);
|
||||
|
||||
const createOneObjectMetadataItem = async (input: CreateObjectInput) => {
|
||||
const createdObjectMetadata = await mutate({
|
||||
|
||||
Reference in New Issue
Block a user