Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fragment experimentation (V2.0.0-3) #195

Merged
merged 40 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
982b589
fragment experimentation
brettjurgens Jun 7, 2018
5737878
add missing files
brettjurgens Jun 7, 2018
23dcc53
start IR and debug
Aug 9, 2018
0c22684
flattening improvements & flatten adjacent fragments
Aug 10, 2018
3da685e
improvements to IR
Aug 10, 2018
4127e54
it works
Aug 12, 2018
350b656
some type fixes & documentation
Aug 13, 2018
bcd9d0a
refactor interface
Aug 17, 2018
ad6013c
getting somewhere
Aug 17, 2018
3e9f901
fix build errors
Aug 17, 2018
35c165f
Merge branch 'master' into experiment_with_fragments
Oct 11, 2018
12ee5e9
working!?
Oct 15, 2018
77128b4
fix nullish
Oct 15, 2018
8b444a6
maybe fix grabbing field
Oct 15, 2018
5d9907d
fix fragment typecondition in flattening
Oct 15, 2018
79abe85
rm unused import
Oct 15, 2018
b50059f
allow aliasing __typename
Oct 15, 2018
aa4f7cb
subtype generation
Oct 15, 2018
aea052f
start integrating in fromQuery
Oct 16, 2018
4672791
sort in new array instead
Oct 16, 2018
905b1da
postprocess whole output
Oct 16, 2018
4d790e7
list override
Oct 16, 2018
b353a56
export stuff
Oct 16, 2018
b1e43c8
spread var interfaces
Oct 17, 2018
4807d00
pass user options in
Oct 17, 2018
95b0b3b
fix non-null
Oct 17, 2018
27382fc
v2.0.0-0
Oct 17, 2018
183b56e
fix input type
Oct 17, 2018
34707b8
v2.0.0-1
Oct 17, 2018
ffa83da
some cleanup
Oct 17, 2018
193007c
v2.0.0-2
Oct 17, 2018
2acf3a8
fix generated declaration name in interface
Nov 28, 2018
6e85dcd
v2.0.0-3
Nov 28, 2018
6d46819
Merge branch '2.0.0' into experiment_with_fragments
BrandonHermanAvant Mar 13, 2020
a814433
Fix tests
BrandonHermanAvant Mar 13, 2020
5226eb5
Comment out Union Tests
BrandonHermanAvant Mar 13, 2020
e0bc678
Clean up tests / comment out failures
BrandonHermanAvant Mar 13, 2020
83ffb4a
Add testurl
BrandonHermanAvant Mar 13, 2020
6bd4a39
bump node versions
BrandonHermanAvant Mar 13, 2020
2509601
v8
BrandonHermanAvant Mar 13, 2020
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
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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

## 1.10.1

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