Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat (content api): graphql validation (#35191)

Charise41d90926ba0
diff --git a/apps/docs/app/api/graphql/route.ts b/apps/docs/app/api/graphql/route.ts
index 7c5e8c9fdde..7efda7c254a 100644
--- a/apps/docs/app/api/graphql/route.ts
+++ b/apps/docs/app/api/graphql/route.ts
@@ -1,8 +1,11 @@
-// import { graphql } from 'graphql'
+import { type DocumentNode, graphql, GraphQLError, parse, specifiedRules, validate } from 'graphql'
+import { createComplexityLimitRule } from 'graphql-validation-complexity'
import { NextResponse } from 'next/server'
import { z } from 'zod'
-
import { ApiError, InvalidRequestError } from '~/app/api/utils'
+import { rootGraphQLResolver } from '~/resources/rootResolver'
+import { rootGraphQLSchema } from '~/resources/rootSchema'
+import { createQueryDepthLimiter } from './validators'
export const runtime = 'edge'
@@ -24,14 +27,57 @@ async function handleGraphQLRequest(request: Request): Promise<NextResponse> {
)
}
- // const { query, variables, operationName } = parsedBody.data
- // When endpoint is complete, this should return a response with the GraphQL
- // query result
+ const { query, variables, operationName } = parsedBody.data
+ const validationErrors = validateGraphQLRequest(query)
+ if (validationErrors.length > 0) {
+ return NextResponse.json({
+ errors: validationErrors.map((error) => ({
+ message: error.message,
+ locations: error.locations,
+ path: error.path,
+ })),
+ })
+ }
+
+ const result = await graphql({
+ schema: rootGraphQLSchema,
+ rootValue: rootGraphQLResolver,
+ contextValue: { request },
+ source: query,
+ variableValues: variables,
+ operationName,
+ })
+ // return NextResponse.json(result)
// For now, just return a 404 response
return new NextResponse('Not Found', { status: 404 })
}
+function validateGraphQLRequest(query: string): ReadonlyArray<GraphQLError> {
+ const MAX_DEPTH = 9
+
+ let documentAST: DocumentNode
+ try {
+ documentAST = parse(query)
+ } catch (error: unknown) {
+ if (error instanceof GraphQLError) {
+ return [error]
+ } else {
+ throw error
+ }
+ }
+ const validationRules = [
+ ...specifiedRules,
+ createQueryDepthLimiter(MAX_DEPTH),
+ createComplexityLimitRule(1500, {
+ scalarCost: 1,
+ objectCost: 2,
+ listFactor: 10,
+ }),
+ ]
+ return validate(rootGraphQLSchema, documentAST, validationRules)
+}
+
export async function POST(request: Request): Promise<NextResponse> {
try {
return await handleGraphQLRequest(request)
diff --git a/apps/docs/app/api/graphql/validators.test.ts b/apps/docs/app/api/graphql/validators.test.ts
new file mode 100644
index 00000000000..0659623848d
--- /dev/null
+++ b/apps/docs/app/api/graphql/validators.test.ts
@@ -0,0 +1,247 @@
+import { buildSchema, parse, validate } from 'graphql'
+import { describe, expect, test } from 'vitest'
+import { createQueryDepthLimiter } from './validators'
+
+describe('createQueryDepthLimiter', () => {
+ // Create a test schema
+ const schema = buildSchema(`
+ type Post {
+ id: ID!
+ title: String
+ content: String
+ author: User
+ comments: [Comment]
+ }
+
+ type User {
+ id: ID!
+ name: String
+ email: String
+ posts: [Post]
+ friends: [User]
+ }
+
+ type Comment {
+ id: ID!
+ text: String
+ author: User
+ post: Post
+ replies: [Comment]
+ }
+
+ type Query {
+ post(id: ID!): Post
+ user(id: ID!): User
+ posts: [Post]
+ users: [User]
+ }
+ `)
+
+ test('should not report error for queries under max depth', () => {
+ const query = `
+ query {
+ posts {
+ title
+ author {
+ name
+ }
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors).toHaveLength(0)
+ })
+
+ test('should report error for queries exceeding max depth', () => {
+ const query = `
+ query {
+ posts {
+ title
+ author {
+ name
+ posts {
+ title
+ }
+ }
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors.length).toBeGreaterThan(0)
+ expect(errors[0].message).toContain('Query exceeds maximum depth of 3')
+ })
+
+ test('should ignore __typename fields when calculating depth', () => {
+ const query = `
+ query {
+ posts {
+ __typename
+ title
+ author {
+ __typename
+ name
+ posts {
+ __typename
+ }
+ }
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors).toHaveLength(0)
+ })
+
+ test('should handle fragments correctly', () => {
+ const query = `
+ fragment UserDetails on User {
+ id
+ name
+ posts {
+ title
+ }
+ }
+
+ query {
+ users {
+ ...UserDetails
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors).toHaveLength(0)
+ })
+
+ test('should report error for fragments exceeding max depth', () => {
+ const query = `
+ fragment UserDetails on User {
+ id
+ name
+ posts {
+ title
+ author {
+ name
+ }
+ }
+ }
+
+ query {
+ users {
+ ...UserDetails
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors.length).toBeGreaterThan(0)
+ expect(errors[0].message).toContain(
+ 'Fragment spread "UserDetails" causes query to exceed maximum depth'
+ )
+ })
+
+ test('should report error for fragment spreads causing excessive depth', () => {
+ const query = `
+ fragment PostDetails on Post {
+ title
+ content
+ }
+
+ fragment UserDetails on User {
+ name
+ posts {
+ ...PostDetails
+ }
+ }
+
+ query {
+ users {
+ friends {
+ ...UserDetails
+ }
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors.length).toBeGreaterThan(0)
+ })
+
+ test('should handle nested fragments correctly', () => {
+ const query = `
+ fragment CommentDetails on Comment {
+ text
+ author {
+ name
+ }
+ }
+
+ fragment PostDetails on Post {
+ title
+ comments {
+ ...CommentDetails
+ }
+ }
+
+ query {
+ posts {
+ ...PostDetails
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors.length).toBeGreaterThan(0)
+ })
+
+ test('should handle inline fragments', () => {
+ const query = `
+ query {
+ posts {
+ ... on Post {
+ title
+ author {
+ name
+ }
+ }
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 3
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors).toHaveLength(0)
+ })
+
+ test('should detect circular fragment references', () => {
+ const query = `
+ fragment UserPosts on User {
+ posts {
+ author {
+ ...UserPosts
+ }
+ }
+ }
+
+ query {
+ users {
+ ...UserPosts
+ }
+ }
+ `
+ const queryAST = parse(query)
+ const maxDepth = 5
+ // This should not go into infinite recursion
+ const errors = validate(schema, queryAST, [createQueryDepthLimiter(maxDepth)])
+ expect(errors.length).toBeGreaterThan(0)
+ })
+})
diff --git a/apps/docs/app/api/graphql/validators.ts b/apps/docs/app/api/graphql/validators.ts
new file mode 100644
index 00000000000..f4ca8e68df9
--- /dev/null
+++ b/apps/docs/app/api/graphql/validators.ts
@@ -0,0 +1,157 @@
+import {
+ type FragmentDefinitionNode,
+ GraphQLError,
+ type SelectionNode,
+ type ValidationContext,
+ type ValidationRule,
+} from 'graphql'
+
+/**
+ * Creates a validator that limits the depth of a GraphQL query.
+ *
+ * @param maxDepth The maximum allowed depth
+ * @returns A validation rule that enforces depth limits
+ */
+export function createQueryDepthLimiter(maxDepth: number): ValidationRule {
+ const fragmentDepthMap = new Map<string, number>()
+
+ return function limitQueryDepth(context) {
+ return {
+ Document: {
+ leave() {
+ fragmentDepthMap.clear()
+ },
+ },
+ Field: {
+ enter(node, _key, _parent, path, ancestors) {
+ // Skip __typename and introspection fields
+ if (node.name.value === '__typename' || node.name.value.startsWith('__')) {
+ return
+ }
+
+ // Calculate the depth by counting the ancestors that are field nodes
+ const fieldAncestors = ancestors.filter(
+ (ancestor) => ancestor && 'kind' in ancestor && ancestor.kind === 'Field'
+ )
+ const depth = fieldAncestors.length + 1
+
+ // Check if this field exceeds the maximum maxDepth
+ if (depth > maxDepth) {
+ const pathStr = path.join('.')
+ context.reportError(
+ new GraphQLError(
+ `Query exceeds maximum depth of ${maxDepth}. Got depth ${depth} for ${pathStr}.`,
+ { nodes: node }
+ )
+ )
+ }
+ },
+ },
+ FragmentDefinition: {
+ enter(node) {
+ calculateFragmentDepth(node, context, 0, fragmentDepthMap, maxDepth)
+ const depth = fragmentDepthMap.get(node.name.value)!
+
+ if (depth > maxDepth) {
+ context.reportError(
+ new GraphQLError(
+ `Fragment "${node.name.value}" exceeds maximum depth of ${maxDepth}.`,
+ { nodes: node }
+ )
+ )
+ }
+ },
+ },
+ FragmentSpread: {
+ enter(node, _key, _parent, _path, ancestors) {
+ const fragmentName = node.name.value
+ const fragmentDepth = fragmentDepthMap.get(fragmentName) || 0
+
+ const fieldAncestors = ancestors.filter(
+ (ancestor) => ancestor && 'kind' in ancestor && ancestor.kind === 'Field'
+ )
+ const currentDepth = fieldAncestors.length
+
+ const totalDepth = currentDepth + fragmentDepth
+
+ if (totalDepth > maxDepth) {
+ context.reportError(
+ new GraphQLError(
+ `Fragment spread "${fragmentName}" causes query to exceed maximum depth of ${maxDepth}.`,
+ { nodes: node }
+ )
+ )
+ }
+ },
+ },
+ }
+ }
+}
+
+/**
+ * Helper function to calculate the depth of a fragment
+ */
+function calculateFragmentDepth(
+ node: FragmentDefinitionNode,
+ context: ValidationContext,
+ currentDepth: number,
+ visitedFragments: Map<string, number>,
+ maxDepth: number
+) {
+ const fragmentName = node.name.value
+ if (visitedFragments.has(fragmentName)) {
+ return
+ }
+
+ let maxFragmentDepth = 0
+ // Process all selections in the fragment
+ function processSelections(selections: ReadonlyArray<SelectionNode>, depth: number) {
+ for (const selection of selections) {
+ if (selection.kind === 'Field') {
+ // Skip __typename and introspection fields
+ if (selection.name.value === '__typename' || selection.name.value.startsWith('__')) {
+ continue
+ }
+
+ const newDepth = depth + 1
+ if (newDepth > maxFragmentDepth) {
+ maxFragmentDepth = newDepth
+ }
+ if (maxFragmentDepth > maxDepth) {
+ // Do not recurse anymore because we might go on indefinitely
+ continue
+ }
+
+ // If there are nested selections, process them
+ if (selection.selectionSet) {
+ processSelections(selection.selectionSet.selections, newDepth)
+ }
+ } else if (selection.kind === 'FragmentSpread') {
+ // Process fragment spreads
+ const spreadName = selection.name.value
+ const fragment = context.getFragment(spreadName)
+ if (!fragment) continue
+
+ const fragmentName = fragment.name.value
+ if (!visitedFragments.has(fragmentName)) {
+ calculateFragmentDepth(fragment, context, depth, visitedFragments, maxDepth)
+ }
+ const fragmentDepth = visitedFragments.get(fragmentName)!
+ const totalDepth = fragmentDepth + depth
+
+ if (totalDepth > maxFragmentDepth) {
+ maxFragmentDepth = totalDepth
+ }
+ } else if (selection.kind === 'InlineFragment' && selection.selectionSet) {
+ // Process inline fragments
+ processSelections(selection.selectionSet.selections, depth)
+ }
+ }
+ }
+
+ if (node.selectionSet) {
+ processSelections(node.selectionSet.selections, currentDepth)
+ }
+
+ visitedFragments.set(fragmentName, maxFragmentDepth)
+}
diff --git a/apps/docs/app/graphiql/page.tsx b/apps/docs/app/graphiql/page.tsx
new file mode 100644
index 00000000000..6443554bbbd
--- /dev/null
+++ b/apps/docs/app/graphiql/page.tsx
@@ -0,0 +1,33 @@
+'use client'
+
+import dynamic from 'next/dynamic'
+import { notFound } from 'next/navigation'
+import { type ComponentProps } from 'react'
+import { IS_DEV } from '~/lib/constants'
+
+const LazyGraphiQL = dynamic(
+ async () => {
+ const { GraphiQL: GraphiQLPrimitive } = await import('graphiql')
+ const { createGraphiQLFetcher } = await import('@graphiql/toolkit')
+ await import('graphiql/graphiql.css')
+
+ return function GraphiQL(props: Omit<ComponentProps<typeof GraphiQLPrimitive>, 'fetcher'>) {
+ const fetcher = createGraphiQLFetcher({
+ url: 'http://localhost:3001/docs/api/graphql',
+ })
+ return <GraphiQLPrimitive fetcher={fetcher} {...props} />
+ }
+ },
+ {
+ loading: () => <div className="p-6">Loading GraphiQL...</div>,
+ ssr: false,
+ }
+)
+
+export default function GraphiQLPage() {
+ if (!IS_DEV) {
+ notFound()
+ }
+
+ return <LazyGraphiQL className="!h-[calc(100vh-var(--header-height))]" />
+}
diff --git a/apps/docs/package.json b/apps/docs/package.json
index dd046d93891..b145e54337f 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -56,6 +56,7 @@
"framer-motion": "^11.0.3",
"github-slugger": "^2.0.0",
"graphql": "^16.10.0",
+ "graphql-validation-complexity": "^0.4.2",
"gray-matter": "^4.0.3",
"hast-util-has-property": "^2.0.1",
"hast-util-to-html": "^9.0.0",
@@ -112,9 +113,11 @@
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.410.0",
+ "@graphiql/toolkit": "^0.9.1",
"@supabase/supa-mdx-lint": "0.2.6-alpha",
"@types/common-tags": "^1.8.4",
"@types/estree": "1.0.5",
+ "@types/graphql-validation-complexity": "^0.4.4",
"@types/hast": "^2.3.4",
"@types/jsrsasign": "^10.5.12",
"@types/mdast": "^3.0.0",
@@ -131,6 +134,7 @@
"dotenv": "^16.0.3",
"ejs": "^3.1.10",
"globby": "^13.2.2",
+ "graphiql": "^3.8.3",
"openapi-types": "^12.1.3",
"shiki": "^3.2.1",
"simple-git": "^3.24.0",
diff --git a/apps/docs/resources/rootResolver.ts b/apps/docs/resources/rootResolver.ts
new file mode 100644
index 00000000000..c65cd01a5b6
--- /dev/null
+++ b/apps/docs/resources/rootResolver.ts
@@ -0,0 +1 @@
+export const rootGraphQLResolver = {}
diff --git a/apps/docs/resources/rootSchema.ts b/apps/docs/resources/rootSchema.ts
new file mode 100644
index 00000000000..7dd25048a82
--- /dev/null
+++ b/apps/docs/resources/rootSchema.ts
@@ -0,0 +1,8 @@
+import { GraphQLObjectType, GraphQLSchema } from 'graphql'
+
+export const rootGraphQLSchema = new GraphQLSchema({
+ query: new GraphQLObjectType({
+ name: 'RootQueryType',
+ fields: {},
+ }),
+})
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b21aa326339..b5b8299a5f0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -285,6 +285,9 @@ importers:
graphql:
specifier: ^16.10.0
version: 16.10.0
+ graphql-validation-complexity:
+ specifier: ^0.4.2
+ version: 0.4.2([email protected])
gray-matter:
specifier: ^4.0.3
version: 4.0.3
@@ -448,6 +451,9 @@ importers:
'@aws-sdk/client-secrets-manager':
specifier: ^3.410.0
version: 3.468.0
+ '@graphiql/toolkit':
+ specifier: ^0.9.1
'@supabase/supa-mdx-lint':
specifier: 0.2.6-alpha
version: 0.2.6-alpha
@@ -457,6 +463,9 @@ importers:
'@types/estree':
specifier: 1.0.5
version: 1.0.5
+ '@types/graphql-validation-complexity':
+ specifier: ^0.4.4
+ version: 0.4.4
'@types/hast':
specifier: ^2.3.4
version: 2.3.6
@@ -502,6 +511,9 @@ importers:
globby:
specifier: ^13.2.2
version: 13.2.2
+ graphiql:
+ specifier: ^3.8.3
openapi-types:
specifier: ^12.1.3
version: 12.1.3
@@ -3170,6 +3182,22 @@ packages:
react: ^16.8.0 || ^17 || ^18
react-dom: ^16.8.0 || ^17 || ^18
+ '@graphiql/[email protected]':
+ resolution: {integrity: sha512-6PE2Ff9dXpyQMHy3oKzCjT738kY2+wdQ4Xce8+1K+G2yMGZ716Fo0i4vW3S6ErHVI4S/C76gFTQlv/pzxU5ylg==}
+ peerDependencies:
+ graphql: ^15.5.0 || ^16.0.0 || ^17.0.0
+ react: ^16.8.0 || ^17 || ^18
+ react-dom: ^16.8.0 || ^17 || ^18
+
+ '@graphiql/[email protected]':
+ resolution: {integrity: sha512-G02te70/oYYna5UhbH6TXwNxeQyWa+ChlPonUrKwC5Ot9ItraGJ9yUU4sS+YRaA+EvkzNoHG79XcW2k1QaAMiw==}
+ peerDependencies:
+ graphql: ^15.5.0 || ^16.0.0 || ^17.0.0
+ graphql-ws: '>= 4.5.0'
+ peerDependenciesMeta:
+ graphql-ws:
+ optional: true
+
'@graphiql/[email protected]':
resolution: {integrity: sha512-LVt9pdk0830so50ZnU2Znb2rclcoWznG8r8asqAENzV0U1FM1kuY0sdPpc/rBc9MmmNgnB6A+WZzDhq6dbhTHA==}
peerDependencies:
@@ -6519,6 +6547,9 @@ packages:
resolution: {integrity: sha512-uK2z1ZHJyC0nQRbuovXFt4mzXDwf27vQeUWNhfKGwRcWW429GOhP8HxUHlM6TLH4bzmlv/HlEjpvJh3JfmGsAA==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-/0AmF5HYHmLErXRky/be86E4hAVO2LE5ejHdy3kf1rASgzBDG3Yb1yqoHxrZz+Nk72jt2UWCfa6DSfdpHDkuzg==}
+
resolution: {integrity: sha512-47rJE80oqPmFdVDCD7IheXBrVdwuBgsYwoczFvKmwfo2Mzsnt+V9OONsYauFmICb6lQPpCuXYJWejBNs4pDJRg==}
@@ -7670,6 +7701,13 @@ packages:
codemirror: ^5.65.3
graphql: ^15.5.0 || ^16.0.0
+ resolution: {integrity: sha512-egIiewf5zEH5LLSkJpJDpYxO1OkNruD0gTWiBrS1JmXk7yjt5WPw7jSmDRkWJx8JheHONltaJPNPWdTUT5LRIQ==}
+ peerDependencies:
+ '@codemirror/language': 6.0.0
+ codemirror: ^5.65.3
+ graphql: ^15.5.0 || ^16.0.0 || ^17.0.0
+
resolution: {integrity: sha512-YC4EHbbwQeubZzxLl5G4nlbLc1T21QTrKGaOal/Pkm9dVDMZXMH7+ieSPEOZCtO9I68i8/oteJKOxzHC2zR+0g==}
@@ -9214,6 +9252,10 @@ packages:
resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
+ resolution: {integrity: sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA==}
+ engines: {node: '>=6.0'}
+
resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
hasBin: true
@@ -9303,12 +9345,30 @@ packages:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+ resolution: {integrity: sha512-cuPDYtXVKV86Pu5PHBX642Odi/uVEE2y1Jxq5rGO/Qy1G2lRp7ZZ7a/T30RzxhuLSWo9zUbzq0P3U49//H0Ugw==}
+ peerDependencies:
+ graphql: ^15.5.0 || ^16.0.0 || ^17.0.0
+ react: ^16.8.0 || ^17 || ^18
+ react-dom: ^16.8.0 || ^17 || ^18
+
resolution: {integrity: sha512-o/ZgTS0pBxWm3hSF4+6GwiV1//DxzoLWEbS38+jqpzzy1d/QXBidwQuVYTOksclbtOJZ3KR/tZ8fi/tI6VpVMg==}
hasBin: true
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
+ resolution: {integrity: sha512-gCQIIy7lM9CB1KPLEb+DNZLczA9zuTLEOJE2hEQZTFYInogdmMDRa6RAkvM4LL0LcgcS+3uPs6KtHlcjCqRbUg==}
+ hasBin: true
+ peerDependencies:
+ graphql: ^15.5.0 || ^16.0.0 || ^17.0.0-alpha.2
+
+ resolution: {integrity: sha512-4tzmN/70a06c2JH5fvISkoLX6oBDpqK22cvr2comge3HZHtBLD3n5Sl6MnQYMVhQqKGlpZWcCgD00MnyKNzYYg==}
+ peerDependencies:
+ graphql: '>=0.9.5'
+
resolution: {integrity: sha512-aqkls1espsygP1PfkAuuLIV96IbztQ6EaADse97pw8wRIMT3+AL/OYfS8V2iCRkc0gzckitoDRGCQEdnySggiA==}
engines: {node: '>=10'}
@@ -10285,6 +10345,9 @@ packages:
resolution: {integrity: sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==}
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
resolution: {integrity: sha512-S3D0WZ4J6hyM8o5SNKWaMYB1ALSacPZ2nHGEuCjmHZ+dc03gFeNZoNDcqfcnO4vDhTZmNrqrpYZCdXsRh22bzw==}
engines: {node: '>=0.10.0'}
@@ -10482,6 +10545,10 @@ packages:
resolution: {integrity: sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==}
hasBin: true
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
resolution: {integrity: sha512-TurLymbyLyo+kAUUAV9ggR9EPcDjP/ctlv9QAFiqUH7c+t6FlsbivPo9OKTU8xdOx9oNd2drW/Fi5RRElQbUqA==}
engines: {node: '>=0.10.0'}
@@ -10630,6 +10697,9 @@ packages:
resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==}
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
resolution: {integrity: sha512-0wF0zoCv+Ms4G+eSlk/jaKYoJHc0oXBaOma3kYlFJiKq9H8h41Dd66ioDBGF4noy80Pf7KTBQlyHfEpTqVml7A==}
engines: {node: '>=18', npm: '>=6'}
@@ -12150,6 +12220,10 @@ packages:
resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
engines: {node: '>=6'}
@@ -12222,6 +12296,11 @@ packages:
react: ^16.8.5 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.5 || ^17.0.0 || ^18.0.0
+ resolution: {integrity: sha512-9e6rCpVylr9EnVocgYAjft7+2v01BDpajeHKRoO+oc9pKcAMTpstHtHvE/TSVbyf4FvzCGjfKcfHM9XGTXI6Tw==}
+ peerDependencies:
+ react: ^17.0.0 || ^18.0.0 || ^19.0.0
+
resolution: {integrity: sha512-2FIp7lxJ6dtfGr8EZ4uVV5p5TQjd0n2h/JU7PrejNIMiCeZWvSVPFh4lj1ZvjXosglBvP7q5JQQ8yUCdSaMSaw==}
engines: {node: '>=10'}
@@ -13916,6 +13995,9 @@ packages:
resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==}
@@ -16110,6 +16192,45 @@ snapshots:
- '@types/react-dom'
- graphql-ws
+ dependencies:
+ '@radix-ui/react-dropdown-menu': 2.0.6(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-visually-hidden': 1.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@types/codemirror': 5.60.10
+ clsx: 1.2.1
+ codemirror: 5.65.15
+ codemirror-graphql: 2.2.0(@codemirror/[email protected])([email protected])([email protected])
+ copy-to-clipboard: 3.3.3
+ get-value: 3.0.1
+ graphql: 16.10.0
+ graphql-language-service: 5.3.0([email protected])
+ markdown-it: 14.1.0
+ react: 18.3.1
+ react-compiler-runtime: 19.0.0-beta-37ed2a7-20241206([email protected])
+ react-dom: 18.3.1([email protected])
+ set-value: 4.1.0
+ transitivePeerDependencies:
+ - '@codemirror/language'
+ - '@types/node'
+ - '@types/react'
+ - '@types/react-dom'
+ - graphql-ws
+
+ dependencies:
+ '@n1ru4l/push-pull-async-iterable-iterator': 3.2.0
+ graphql: 16.10.0
+ meros: 1.3.0(@types/[email protected])
+ optionalDependencies:
+ graphql-ws: 5.14.1([email protected])
+ transitivePeerDependencies:
+ - '@types/node'
+
dependencies:
'@n1ru4l/push-pull-async-iterable-iterator': 3.2.0
@@ -20467,6 +20588,10 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]':
+ dependencies:
+ graphql: 16.10.0
+
dependencies:
'@types/unist': 2.0.8
@@ -21910,6 +22035,14 @@ snapshots:
graphql: 16.10.0
graphql-language-service: 5.2.0([email protected])
+ dependencies:
+ '@codemirror/language': 6.11.0
+ '@types/codemirror': 0.0.90
+ codemirror: 5.65.15
+ graphql: 16.10.0
+ graphql-language-service: 5.3.0([email protected])
+
@@ -23599,6 +23732,10 @@ snapshots:
dependencies:
resolve-pkg-maps: 1.0.0
+ dependencies:
+ isobject: 3.0.1
+
dependencies:
citty: 0.1.6
@@ -23727,12 +23864,37 @@ snapshots:
+ dependencies:
+ graphql: 16.10.0
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ transitivePeerDependencies:
+ - '@codemirror/language'
+ - '@types/node'
+ - '@types/react'
+ - '@types/react-dom'
+ - graphql-ws
+
dependencies:
graphql: 16.10.0
nullthrows: 1.1.1
vscode-languageserver-types: 3.17.5
+ dependencies:
+ debounce-promise: 3.1.2
+ graphql: 16.10.0
+ nullthrows: 1.1.1
+ vscode-languageserver-types: 3.17.5
+
+ dependencies:
+ graphql: 16.10.0
+ warning: 4.0.3
+
dependencies:
graphql: 16.10.0
@@ -24865,6 +25027,10 @@ snapshots:
dependencies:
uc.micro: 1.0.6
+ dependencies:
+ uc.micro: 2.1.0
+
dependencies:
expand-range: 1.8.2
@@ -25107,6 +25273,15 @@ snapshots:
mdurl: 1.0.1
uc.micro: 1.0.6
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
@@ -25490,6 +25665,8 @@ snapshots:
+
dependencies:
'@babel/runtime': 7.26.10
@@ -26281,7 +26458,7 @@ snapshots:
'@open-draft/until': 2.1.0
'@types/cookie': 0.6.0
'@types/statuses': 2.0.5
- graphql: 16.8.1
+ graphql: 16.10.0
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.3
@@ -26307,7 +26484,7 @@ snapshots:
'@open-draft/until': 2.1.0
'@types/cookie': 0.6.0
'@types/statuses': 2.0.5
- graphql: 16.8.1
+ graphql: 16.10.0
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.3
@@ -27563,6 +27740,8 @@ snapshots:
+
@@ -27636,6 +27815,10 @@ snapshots:
transitivePeerDependencies:
- react-native
+ dependencies:
+ react: 18.3.1
+
dependencies:
clsx: 1.2.1
@@ -29768,6 +29951,8 @@ snapshots:
+