Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphiql/react

Package Overview
Dependencies
Maintainers
5
Versions
307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphiql/react - npm Package Compare versions

Comparing version 0.28.0 to 0.28.1-canary-47ea44d2.0

2

package.json
{
"name": "@graphiql/react",
"version": "0.28.0",
"version": "0.28.1-canary-47ea44d2.0",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -6,3 +6,4 @@ import { fillLeafs, GetDefaultFieldNamesFn, mergeAst } from '@graphiql/toolkit';

import { parse, print } from 'graphql';
import { useEffect, useRef, useState } from 'react';
// eslint-disable-next-line @typescript-eslint/no-restricted-imports -- TODO: check why query builder update only 1st field https://github.com/graphql/graphiql/issues/3836
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';

@@ -348,5 +349,4 @@ import { useExplorerContext } from '../explorer';

export const useEditorState = (
editor: 'query' | 'variable' | 'header',
): [string, (val: string) => void] => {
export const useEditorState = (editor: 'query' | 'variable' | 'header') => {
'use no memo'; // eslint-disable-line react-compiler/react-compiler -- TODO: check why query builder update only 1st field https://github.com/graphql/graphiql/issues/3836
const context = useEditorContext({

@@ -363,4 +363,10 @@ nonNull: true,

const handleEditorValue = (value: string) => editorInstance?.setValue(value);
return [valueString, handleEditorValue];
const handleEditorValue = useCallback(
(value: string) => editorInstance?.setValue(value),
[editorInstance],
);
return useMemo<[string, (val: string) => void]>(
() => [valueString, handleEditorValue],
[valueString, handleEditorValue],
);
};

@@ -367,0 +373,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc