Skip to content

Commit

Permalink
aa
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Dec 11, 2024
1 parent 7a9cf49 commit e44ced9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-cycles-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphiql/react': minor
---

compile source code with react-compiler, remove `useMemo` and `useCallback` usages
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dev-graphiql": "yarn workspace graphiql dev",
"e2e": "yarn run e2e:build && yarn workspace graphiql e2e",
"e2e:build": "WEBPACK_SERVE=1 yarn workspace graphiql build-bundles",
"eslint": "NODE_OPTIONS=--max-old-space-size=4096 ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 --ignore-path .gitignore --cache .",
"eslint": "NODE_OPTIONS=--max-old-space-size=4096 ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=6 --ignore-path .gitignore --cache .",
"format": "yarn eslint --fix && yarn pretty",
"jest": "jest",
"license-check": "jsgl --local packages/*",
Expand Down
4 changes: 2 additions & 2 deletions packages/graphiql-react/src/explorer/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function Search() {
const getSearchResults = useSearchResults();
const [searchValue, setSearchValue] = useState('');
const [results, setResults] = useState(getSearchResults(searchValue));
const [isFocused, setIsFocused] = useState(false)
const [isFocused, setIsFocused] = useState(false);
const debouncedGetSearchResults = debounce(200, (search: string) => {
setResults(getSearchResults(search));
});
Expand Down Expand Up @@ -58,7 +58,7 @@ export function Search() {
);
};
const handleFocus: FocusEventHandler = e => {
setIsFocused(e.type === 'focus')
setIsFocused(e.type === 'focus');
};

const shouldSearchBoxAppear =
Expand Down
4 changes: 2 additions & 2 deletions packages/graphiql-react/src/explorer/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function ExplorerContextProvider(props: ExplorerContextProviderProps) {
break;
} else {
// lastEntity must be a field (because it's not a named type)
const field: GraphQLField<any, any, any> = lastEntity;
const field: GraphQLField<any, any> = lastEntity;
// Thus item.def must be an argument, so find the same named argument in the new schema
const arg = field.args.find(a => a.name === item.name);
if (arg) {
Expand All @@ -188,7 +188,7 @@ export function ExplorerContextProvider(props: ExplorerContextProviderProps) {
return newNavStack;
});
}
}, [reset, schema, validationErrors]);
}, [schema, validationErrors]);

const value: ExplorerContextType = {
explorerNavStack: navStack,
Expand Down

0 comments on commit e44ced9

Please sign in to comment.