Skip to content
Open

2.0.0 #210

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jspm_packages
# files i use to test output
*.d.ts
*.json
/test.ts

## remove js files
packages/**/*.js
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ language: node_js
node_js:
- "10"
- "8"
- "6"
after_success: npm run coverage
10 changes: 7 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.0

### Breaking Changes
- Remove legacy TS 1.x support (without `strictNullChecks`)
- Drop support for node v6

## 1.10.1

- Fix regression in TypeMap support (thanks [@mikfoo](https://github.com/mikfoo)) [PR #235](https://github.com/avantcredit/gql2ts/pull/235)
Expand All @@ -22,9 +28,7 @@

- Only append a semicolon to 'enums' when they are declared as union types and not Typescript `enum` types. [Issue #179](https://github.com/avantcredit/gql2ts/issues/179) [PR #202](https://github.com/avantcredit/gql2ts/pull/202)

## 1.8.0

- Add specific `__typename` value for `@gql2ts/from-query` [Issue #165](https://github.com/avantcredit/gql2ts/issues/165) [PR #168](https://github.com/avantcredit/gql2ts/pull/168)
- Add specific `__typename` value for `@gql2ts/from-query` [Issue #165](https://github.com/avantcredit/gql2ts/issues/165) [PR #169](https://github.com/avantcredit/gql2ts/pull/169)

- Import TypeMap from language packages [PR #175](https://github.com/avantcredit/gql2ts/pull/175) [PR #176](https://github.com/avantcredit/gql2ts/pull/176)

Expand Down
104 changes: 24 additions & 80 deletions __tests__/__snapshots__/from-query-mutations-test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,120 +1,64 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Mutations works with multiple arguments 1`] = `
Array [
Object {
"additionalTypes": Array [],
"interface": "export interface CreateMessage {
createMessage: {
id: string;
} | null;
}
",
"result": "export interface CreateMessageInput {
author?: string | null;
content?: string | null;
"export interface SelectionOnMessage {
id: string;
}

export interface CreateMessage {
createMessage: {
id: string;
} | null;
createMessage: SelectionOnMessage | null;
}
",
"variables": "export interface CreateMessageInput {

export interface CreateMessageInput {
author?: string | null;
content?: string | null;
}
",
},
]
"
`;

exports[`Mutations works with no arguments 1`] = `
Array [
Object {
"additionalTypes": Array [],
"interface": "export interface CreateMessage {
createMessage: {
id: string;
} | null;
"export interface SelectionOnMessage {
id: string;
}
",
"result": "export interface CreateMessage {
createMessage: {
id: string;
} | null;

export interface CreateMessage {
createMessage: SelectionOnMessage | null;
}
",
"variables": "",
},
]
"
`;

exports[`Mutations works with one input argument (non-null) 1`] = `
Array [
Object {
"additionalTypes": Array [],
"interface": "export interface CreateMessage {
createMessage: {
id: string;
} | null;
}
",
"result": "export interface CreateMessageInput {
input: {
content?: string | null;
author?: string | null;
};
"export interface SelectionOnMessage {
id: string;
}

export interface CreateMessage {
createMessage: {
id: string;
} | null;
createMessage: SelectionOnMessage | null;
}
",
"variables": "export interface CreateMessageInput {

export interface CreateMessageInput {
input: {
content?: string | null;
author?: string | null;
};
}
",
},
]
"
`;

exports[`Mutations works with one input argument 1`] = `
Array [
Object {
"additionalTypes": Array [],
"interface": "export interface CreateMessage {
createMessage: {
id: string;
} | null;
}
",
"result": "export interface CreateMessageInput {
input?: {
content?: string | null;
author?: string | null;
} | null;
"export interface SelectionOnMessage {
id: string;
}

export interface CreateMessage {
createMessage: {
id: string;
} | null;
createMessage: SelectionOnMessage | null;
}
",
"variables": "export interface CreateMessageInput {

export interface CreateMessageInput {
input?: {
content?: string | null;
author?: string | null;
} | null;
}
",
},
]
"
`;
Loading