Skip to content

Commit

Permalink
refactor: sddm to root types module
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Oct 21, 2024
1 parent 371803e commit c94c574
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/entrypoints/utilities-for-generated.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { type Simplify } from 'type-fest'
export { type SchemaDrivenDataMap } from '../extensions/CustomScalars/schemaDrivenDataMap/__.js'
export { type Schema as SchemaIndexBase } from '../generator/generators/Schema.js'
export { SchemaKit } from '../layers/1_Schema/__.js'
export * from '../layers/2_Select/__.js'
Expand All @@ -14,3 +13,4 @@ export type { Config } from '../layers/6_client/Settings/Config.js'
export { type GlobalRegistry } from '../layers/GlobalRegistry.js'
export { type Exact, type ExactNonEmpty, type UnionExpanded } from '../lib/prelude.js'
export { TypeFunction } from '../lib/type-function/__.js'
export { type SchemaDrivenDataMap } from '../types/SchemaDrivenDataMap/__.js'
2 changes: 1 addition & 1 deletion src/extensions/CustomScalars/decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SchemaKit } from '../../entrypoints/schema.js'
import { applyCodec } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js'
import type { RegisteredScalars } from '../../layers/6_client/fluent.js'
import type { Grafaid } from '../../lib/grafaid/__.js'
import { SchemaDrivenDataMap } from './schemaDrivenDataMap/__.js'
import { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'

/**
* If a document is given then aliases will be decoded as well.
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/CustomScalars/encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SchemaKit } from '../../entrypoints/schema.js'
import { applyCodec } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js'
import type { RegisteredScalars } from '../../layers/6_client/fluent.js'
import { Grafaid } from '../../lib/grafaid/__.js'
import { SchemaDrivenDataMap } from './schemaDrivenDataMap/__.js'
import { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'

export const encodeRequestVariables = ({ sddm, request, scalars }: {
sddm: SchemaDrivenDataMap
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/SchemaErrors/SchemaErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Errors } from '../../lib/errors/__.js'
import { normalizeRequestToNode } from '../../lib/grafaid/request.js'
import { type ExcludeNullAndUndefined, isString } from '../../lib/prelude.js'
import { isRecordLikeObject } from '../../lib/prelude.js'
import { SchemaDrivenDataMap } from '../CustomScalars/schemaDrivenDataMap/__.js'
import { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'
import type { GeneratedExtensions } from './global.js'
import { injectTypenameOnRootResultFields } from './injectTypenameOnRootResultFields.js'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Grafaid } from '../../lib/grafaid/__.js'
import { Nodes } from '../../lib/grafaid/graphql.js'
import type { SchemaDrivenDataMap } from '../CustomScalars/schemaDrivenDataMap/__.js'
import type { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'

export const injectTypenameOnRootResultFields = (
{ request, sddm }: {
Expand Down
2 changes: 1 addition & 1 deletion src/generator/generator/generate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import fs from 'node:fs/promises'
import { ModuleGeneratorSchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/generator.js'
import { createConfig } from '../config/config.js'
import type { Input } from '../config/input.js'
import { ModuleGenerator_ } from '../generators/_.js'
Expand All @@ -12,6 +11,7 @@ import { ModuleGeneratorMethodsRoot } from '../generators/MethodsRoot.js'
import { ModuleGeneratorMethodsSelect } from '../generators/MethodsSelect.js'
import { ModuleGeneratorScalar } from '../generators/Scalar.js'
import { ModuleGeneratorSchema } from '../generators/Schema.js'
import { ModuleGeneratorSchemaDrivenDataMap } from '../generators/SchemaDrivenDataMap.js'
import { ModuleGeneratorSelect } from '../generators/Select.js'
import { ModuleGeneratorSelectionSets } from '../generators/SelectionSets.js'

Expand Down
2 changes: 1 addition & 1 deletion src/generator/generators/Client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ModuleGeneratorSchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/generator.js'
import { createModuleGenerator } from '../helpers/moduleGenerator.js'
import { ModuleGeneratorData } from './Data.js'
import { ModuleGeneratorSchemaDrivenDataMap } from './SchemaDrivenDataMap.js'

export const ModuleGeneratorClient = createModuleGenerator(
`Client`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Config } from '../../../generator/config/config.js'
import { ModuleGeneratorScalar } from '../../../generator/generators/Scalar.js'
import { createModuleGenerator } from '../../../generator/helpers/moduleGenerator.js'
import { createCodeGenerator } from '../../../generator/helpers/moduleGeneratorRunner.js'
import { title1 } from '../../../generator/helpers/render.js'
import { Code } from '../../../lib/Code.js'
import { Grafaid } from '../../../lib/grafaid/__.js'
import { entries } from '../../../lib/prelude.js'
import { nullabilityFlags, propertyNames } from './types.js'
import { Code } from '../../lib/Code.js'
import { Grafaid } from '../../lib/grafaid/__.js'
import { entries } from '../../lib/prelude.js'
import { nullabilityFlags, propertyNames } from '../../types/SchemaDrivenDataMap/SchemaDrivenDataMap.js'
import type { Config } from '../config/config.js'
import { createModuleGenerator } from '../helpers/moduleGenerator.js'
import { createCodeGenerator } from '../helpers/moduleGeneratorRunner.js'
import { title1 } from '../helpers/render.js'
import { ModuleGeneratorScalar } from './Scalar.js'

const identifiers = {
$Scalar: `$Scalar`,
Expand Down
2 changes: 1 addition & 1 deletion src/generator/generators/_.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ModuleGeneratorSchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/generator.js'
import { createModuleGenerator } from '../helpers/moduleGenerator.js'
import { ModuleGeneratorClient } from './Client.js'
import { ModuleGeneratorSchemaDrivenDataMap } from './SchemaDrivenDataMap.js'
import { ModuleGeneratorSelect } from './Select.js'
import { ModuleGeneratorSelectionSets } from './SelectionSets.js'

Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Grafaid } from '../../lib/grafaid/__.js'
import { Nodes } from '../../lib/grafaid/_Nodes.js'
import type { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'
import type { SchemaKit } from '../1_Schema/__.js'
import { inferVariableType } from './inferVariableType.js'
import type { Options } from './nodes/1_Document.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/inferVariableType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'

/**
* Infer the type of a variable for the given argument.
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/mapper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'
import type { OperationContext } from './context.js'

export type GraphQLPreOperationMapper<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Grafaid } from '../../../lib/grafaid/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { Select } from '../../2_Select/__.js'
import { createOperationContext } from '../context.js'
import { type GraphQLPreOperationMapper } from '../mapper.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import { Select } from '../../2_Select/__.js'
import { type GraphQLPostOperationMapper } from '../mapper.js'
import { fromGraffleSelectionObjectLevel } from './4_GraffleSelectionObjectLevel.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Grafaid } from '../../../lib/grafaid/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import { casesExhausted, isNonNull } from '../../../lib/prelude.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { ParsedSelectionObjectLevel } from '../../2_Select/_.js'
import type { GraphQLPostOperationMapper } from '../mapper.js'
import { toGraphQLField } from './5_Field.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/nodes/5_Field.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import { Select } from '../../2_Select/__.js'
import type { GraphQLPostOperationMapper } from '../mapper.js'
import { collectForInlineFragmentLike } from './_collect.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/nodes/Argument.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import { Select } from '../../2_Select/__.js'
import { type GraphQLPostOperationMapper } from '../mapper.js'
import { toGraphQLValue } from './Value.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/nodes/Value.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Grafaid } from '../../../lib/grafaid/__.js'
import { Nodes } from '../../../lib/grafaid/_Nodes.js'
import { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { Scalar } from '../../1_Schema/_.js'
import { SchemaKit } from '../../1_Schema/__.js'
import type { OperationContext } from '../context.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/3_SelectGraphQLMapper/nodes/_collect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Grafaid } from '../../../lib/grafaid/__.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { Select } from '../../2_Select/__.js'
import type { GraphQLPostOperationMapper } from '../mapper.js'
import { fromGraffleSelectionObjectLevel } from './4_GraffleSelectionObjectLevel.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/6_client/Settings/Config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GraphQLSchema } from 'graphql'
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { RequireProperties } from '../../../lib/prelude.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { TransportHttp, TransportMemory } from '../../5_request/types.js'
import type { GlobalRegistry } from '../../GlobalRegistry.js'
import type { Extension } from '../extension/extension.js'
Expand Down
2 changes: 1 addition & 1 deletion src/layers/6_client/Settings/Input.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GraphQLSchema } from 'graphql'
import type { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
import type { GlobalRegistry } from '../../GlobalRegistry.js'
import type { WithInput } from './inputIncrementable/inputIncrementable.js'

Expand Down
2 changes: 1 addition & 1 deletion src/layers/6_client/clientPrefilled.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HasRequiredKeys } from 'type-fest'
import type { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js'
import type { Exact } from '../../lib/prelude.js'
import type { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'
import type { GlobalRegistry } from '../GlobalRegistry.js'
import { type Client, create } from './client.js'
import type { InputBase } from './Settings/Input.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Scalar, type Scalar as SchemaScalar } from '../../../layers/1_Schema/_.js'
import type { Grafaid } from '../../../lib/grafaid/__.js'
import { isString } from '../../../lib/prelude.js'
import { Scalar, type Scalar as SchemaScalar } from '../../layers/1_Schema/_.js'
import type { Grafaid } from '../../lib/grafaid/__.js'
import { isString } from '../../lib/prelude.js'

declare global {
namespace GraffleGlobal {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * as SchemaDrivenDataMap from './types.js'
export * as SchemaDrivenDataMap from './SchemaDrivenDataMap.js'

import { type SchemaDrivenDataMap as SchemaDrivenDataMap_ } from './types.js'
import { type SchemaDrivenDataMap as SchemaDrivenDataMap_ } from './SchemaDrivenDataMap.js'

export type SchemaDrivenDataMap = SchemaDrivenDataMap_

0 comments on commit c94c574

Please sign in to comment.