Skip to content

Commit

Permalink
Update types and fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 20, 2024
1 parent 9f2afbc commit 9d4a4df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
27 changes: 4 additions & 23 deletions src/__tests__/fixtures/simpleSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,29 +368,10 @@ export type simpleSchema = {
};
};

ID: {
kind: 'SCALAR';
name: 'ID';
type: string;
};

String: {
kind: 'SCALAR';
name: 'String';
type: string;
};

Boolean: {
kind: 'SCALAR';
name: 'Boolean';
type: boolean;
};

Int: {
kind: 'SCALAR';
name: 'Int';
type: number;
};
ID: unknown;
String: unknown;
Boolean: unknown;
Int: unknown;

Author: {
kind: 'OBJECT';
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/selection.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
makeDefinitionDecoration,
} from '../namespace';

type schema = simpleSchema;
type schema = addIntrospectionScalars<simpleSchema>;

test('infers simple fields', () => {
type query = parseDocument</* GraphQL */ `
Expand Down
5 changes: 4 additions & 1 deletion src/__tests__/variables.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { describe, it, expectTypeOf } from 'vitest';
import type { simpleSchema as schema } from './fixtures/simpleSchema';
import type { simpleSchema } from './fixtures/simpleSchema';
import type { addIntrospectionScalars } from '../introspection';
import type { parseDocument } from '../parser';
import type { getVariablesType, getScalarType } from '../variables';

type schema = addIntrospectionScalars<simpleSchema>;

describe('getVariablesType', () => {
it('parses document-variables correctly', () => {
const query = `
Expand Down

0 comments on commit 9d4a4df

Please sign in to comment.