<!-- source-hash: 664dbd8a3f944dbed6db57f2bfc1ab42 -->
Extracts variable definitions from GraphQL DocumentNode ASTs at runtime to automatically generate URL parameter handling for query state management.

## Key Components

### Types
- `JSType` - JavaScript types that can be represented in URL parameters (string, number, boolean, array, object)
- `VariableDefinition` - Complete variable metadata including name, type, nullability, and GraphQL type name

### Main Functions
- `extractVariablesFromQuery()` - Parses GraphQL DocumentNode to extract all variable definitions
- `parseGraphQLType()` - Recursively unwraps GraphQL type nodes (NonNull, List, Named types)
- `mapGraphQLTypeToJS()` - Maps GraphQL scalar/input types to JavaScript equivalents
- `isScalarType()` / `isInputObjectType()` - Type classification utilities

### Core Logic
The parser uses GraphQL's visitor pattern to traverse the AST, extracting variable definitions and converting GraphQL type information into JavaScript-compatible metadata for URL state management.

## Usage Example

```typescript
import { gql } from '@apollo/client'
import { extractVariablesFromQuery } from './graphql-parser'

const LOGS_QUERY = gql`
  query GetLogs($search: String!, $filter: LogFilterInput, $limit: Int) {
    logs(search: $search, filter: $filter, limit: $limit) {
      id
      message
    }
  }
`

const variables = extractVariablesFromQuery(LOGS_QUERY)
// Returns:
// {
//   search: { name: 'search', type: 'string', required: true, isArray: false },
//   filter: { name: 'filter', type: 'object', required: false, isArray: false },
//   limit: { name: 'limit', type: 'number', required: false, isArray: false }
// }
```