这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@arvi3411301
Copy link
Member

@arvi3411301 arvi3411301 commented Feb 10, 2020

Description

This PR introduces the v2 workflow for CLI to manage metadata and migrations. It also adds support for creating actions and managing types.

Affected components

  • CLI
  • Extension CLI
  • Build System
  • Tests

Rishichandra Wawhal and others added 30 commits October 30, 2019 14:43
* extract permissions table into smaller components

* v1 actions permissions

* set permissions defaults on unmount

* change role field to role_name in action perm

* handle async state for buttons
@hasura-bot
Copy link
Contributor

Review app for commit 2a99583 deployed to Heroku: https://hge-ci-pull-3859.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3859-2a995835

@hasura-bot
Copy link
Contributor

Review app for commit 004d446 deployed to Heroku: https://hge-ci-pull-3859.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3859-004d4464

@rikinsk rikinsk marked this pull request as ready for review February 24, 2020 07:49
@rikinsk rikinsk self-requested a review February 24, 2020 07:49
rikinsk
rikinsk previously approved these changes Feb 24, 2020
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. Most workflows I could think of seem to work.

@hasura-bot
Copy link
Contributor

Review app for commit 597c6d8 deployed to Heroku: https://hge-ci-pull-3859.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3859-597c6d80

@hasura-bot
Copy link
Contributor

Review app for commit 42dbb67 deployed to Heroku: https://hge-ci-pull-3859.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3859-42dbb676

@hasura-bot
Copy link
Contributor

Review app for commit 19435b0 deployed to Heroku: https://hge-ci-pull-3859.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3859-19435b00

@shahidhk shahidhk merged commit bb63d7e into hasura:master Feb 24, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3859.herokuapp.com is deleted

actionsCodegen
} = require('./services');
const fs = require('fs');
const { getFlagValue, OUTPUT_FILE_FLAG } = require('./utils/commandUtils');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason for having import "regenerator-runtime/runtime" instead of require("regenerator-runtime/runtime");? If we're using require everywhere else then we should stick to it.

const rootArg = commandArgs[2];
switch(rootArg) {
case 'sdl':
const sdlSubCommands = commandArgs.slice(3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to create a variable for that?

const sdlSubCommands = commandArgs.slice(3);
return sdl(sdlSubCommands);
case 'actions-codegen':
const actionCodegenSubCommands = commandArgs.slice(3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -0,0 +1,10 @@
import "regenerator-runtime/runtime";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as for cli-ext/src/command.js

const requestHandler = (payload) => {

const {
body, status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status is not used anywhere.

@@ -0,0 +1,114 @@
const { buildSchema, printSchema, parse } = require('graphql');
const { codegen } = require('@graphql-codegen/core');
const typescriptPlugin = require('@graphql-codegen/typescript');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

return codegenerator;
} catch (e) {
throw e;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about removing this try catch?

return codegenerator;
} catch (e) {
throw e;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

codegenerator = await resolveCodegeneratorFromUrl(codegeneratorPath);
}
} catch (e) {
throw e;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

try {
codegenerator = await resolveCodegenerator(codegenConfig)
} catch (e) {
throw e;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. It would be handled on line 104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/cli Related to CLI s/do-not-merge Do not merge this pull request to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants