-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generator): allow controling case of generated client (#1229)
- Loading branch information
1 parent
a301075
commit 0d4534c
Showing
137 changed files
with
1,837 additions
and
2,866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/extensions/SchemaErrors/tests/fixture/graffle/modules/Client.ts
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/extensions/SchemaErrors/tests/fixture/graffle/modules/Global.ts
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsDocument.ts
This file was deleted.
Oops, something went wrong.
158 changes: 0 additions & 158 deletions
158
src/extensions/SchemaErrors/tests/fixture/graffle/modules/Select.ts
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
src/extensions/SchemaErrors/tests/fixture/graffle/modules/client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createPrefilled } from '../../../../../../entrypoints/client.js' | ||
import * as $$Data from './data.js' | ||
import * as $$SchemaDrivenDataMap from './schema-driven-data-map.js' | ||
export const create = createPrefilled($$Data.Name, $$SchemaDrivenDataMap.schemaDrivenDataMap, $$Data.defaultSchemaUrl) |
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
src/extensions/SchemaErrors/tests/fixture/graffle/modules/global.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as $$Data from './data.js' | ||
import * as $$MethodsDocument from './methods-document.js' | ||
import * as $$MethodsRoot from './methods-root.js' | ||
import * as $$MethodsSelect from './methods-select.js' | ||
import * as $$Schema from './schema.js' | ||
|
||
declare global { | ||
export namespace GraffleGlobal { | ||
export interface Clients { | ||
GraffleSchemaErrors: { | ||
name: $$Data.Name | ||
schema: $$Schema.Schema | ||
interfaces: { | ||
MethodsSelect: $$MethodsSelect.$MethodsSelect | ||
Document: $$MethodsDocument.BuilderMethodsDocumentFn | ||
Root: $$MethodsRoot.BuilderMethodsRootFn | ||
} | ||
defaultSchemaUrl: null | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-document.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type * as $$Utilities from '../../../../../../entrypoints/utilities-for-generated.js' | ||
import * as $$Schema from './schema.js' | ||
import * as $$SelectionSets from './selection-sets.js' | ||
|
||
export interface Document<$Context extends $$Utilities.ClientContext> { | ||
<$Document>( | ||
document: $$Utilities.ExactNonEmpty<$Document, $$SelectionSets.$Document<$Context['scalars']>>, | ||
): $$Utilities.DocumentRunner< | ||
$Context, | ||
$$Schema.Schema, | ||
// @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as | ||
// Satisfying the constraint on the DocumentRunner type. | ||
$Document | ||
> | ||
} | ||
|
||
export interface BuilderMethodsDocumentFn extends $$Utilities.TypeFunction.Fn { | ||
// @ts-expect-error parameter is Untyped. | ||
return: Document<this['params']> | ||
} |
Oops, something went wrong.