Skip to content

Commit

Permalink
React UI for webviews, fix file tracking and fragment spreads (#512)
Browse files Browse the repository at this point in the history
* Load webview script from separate file

* Set up Webpacked package for webview content

* Drop webview-content from Git

* Initial setup for React-extension communication

* Use GraphiQL variables editor for performing queries

* Drop commented code

* Use schema to guide variables code completion

* Use all available space when showing JSON

* Improve typing of variables editor

* Fix syntax highlighting when displaying errors

* Show variables editor if there are any operation variables defined

* Fix issues when creating/deleting/moving query files

* Fix unused type import

* Simplify schema replacement with parsed one

* Use cwd instead of root when globbing

* Fix running queries that have recursive fragment spreads

* Fix unit tests
  • Loading branch information
shadaj authored Jul 26, 2018
1 parent 143b540 commit 57c5379
Show file tree
Hide file tree
Showing 20 changed files with 3,024 additions and 169 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ yarn.lock
lerna-debug.log

packages/apollo-vscode/server
packages/apollo-vscode/webview-content
**/*.vsix
2,187 changes: 2,128 additions & 59 deletions package-lock.json

Large diffs are not rendered by default.

299 changes: 299 additions & 0 deletions packages/apollo-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe("successful checks", () => {
.do(() =>
vol.fromJSON({
...files,
"test/package.json": `
"test-package.json": `
{
"apollo": {
"schemas": {
Expand All @@ -138,7 +138,7 @@ describe("successful checks", () => {
)
.nock(ENGINE_URI, engineSuccess())
.stdout()
.command(["queries:check", "--config=test/package.json"])
.command(["queries:check", "--config=test-package.json"])
.exit(1)
.it(
"compares against the latest uploaded schema with engine key from specified config",
Expand Down
7 changes: 5 additions & 2 deletions packages/apollo-cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export interface ResolvedDocumentSet {
engineKey?: string;

documentPaths: string[];

originalSet: DocumentSet;
}

export async function resolveSchema(
Expand Down Expand Up @@ -248,15 +250,16 @@ export async function resolveDocumentSets(
documentPaths: doc.includes
.flatMap(i =>
withGlobalFS(() =>
fg.sync(i, { root: config.projectFolder, absolute: true })
fg.sync(i, { cwd: config.projectFolder, absolute: true })
)
)
.filter(
f =>
![...doc.excludes, ...schemaPaths].some(e =>
minimatch(relative(config.projectFolder, f), e)
)
)
),
originalSet: doc
};
})
);
Expand Down
11 changes: 11 additions & 0 deletions packages/apollo-codegen-core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 57c5379

Please sign in to comment.