- {keys.map((key, index, array) => (
+ {keys.split('-').map((key, index, array) => (
{key}
{index !== array.length - 1 && ' + '}
@@ -925,41 +892,36 @@ const DefaultToolbarRenderProps: FC<{
// Configure the UI by providing this Component as a child of GraphiQL.
const GraphiQLToolbar: FC<{
children?: typeof DefaultToolbarRenderProps;
-}> = ({
- children = DefaultToolbarRenderProps,
- // @ts-expect-error -- Hide this prop for user, we use cloneElement to pass onCopyQuery
- onCopyQuery,
- // @ts-expect-error -- Hide this prop for user, we use cloneElement to pass onPrettifyQuery
- onPrettifyQuery,
-}) => {
- // eslint-disable-next-line react-hooks/react-compiler
- 'use no memo';
+}> = ({ children = DefaultToolbarRenderProps }) => {
if (typeof children !== 'function') {
throw new TypeError(
'The `GraphiQL.Toolbar` component requires a render prop function as its child.',
);
}
- const onCopy = useCopyQuery({ onCopyQuery });
- const onMerge = useMergeQuery();
- const onPrettify = usePrettifyEditors({ onPrettifyQuery });
const prettify = (
-
+
);
const merge = (
);
const copy = (
-
+
);
@@ -968,8 +930,8 @@ const GraphiQLToolbar: FC<{
};
// Configure the UI by providing this Component as a child of GraphiQL.
-const GraphiQLFooter: FC<{ children: ReactNode }> = props => {
- return {props.children} ;
+const GraphiQLFooter: FC<{ children: ReactNode }> = ({ children }) => {
+ return {children} ;
};
function getChildComponentType(child: ReactNode) {
diff --git a/packages/graphql-language-service/src/utils/getOperationFacts.ts b/packages/graphql-language-service/src/utils/getOperationFacts.ts
index 4abe09a3558..7c3b84e837e 100644
--- a/packages/graphql-language-service/src/utils/getOperationFacts.ts
+++ b/packages/graphql-language-service/src/utils/getOperationFacts.ts
@@ -90,9 +90,7 @@ export default function getOperationFacts(
...getOperationASTFacts(documentAST, schema),
documentAST,
};
- } catch {
- return;
- }
+ } catch {}
}
/**
|