| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714 |
- // 注意是否使用 gql
- // apollo client 需要使用 gql
- // graphql-request 不需要使用 gql
- // import gql from "graphql-tag";
- const GET_USER = `
- query USER($id: ID!) {
- user_by_id(id: $id) {
- email
- updatedAt
- password
- telephone
- nickname
- username
- createdAt
- openid
- id
- avatar
- }
- }
- `;
- const SEARCH_USER = `
- query USER($username: String) {
- user_by_props(username: $username) {
- email
- updatedAt
- password
- telephone
- nickname
- username
- createdAt
- openid
- id
- avatar
- }
- }
- `;
- const ADD_USER = `
- mutation USER($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $avatar: String) {
- create_user(
- email: $email
- updatedAt: $updatedAt
- password: $password
- telephone: $telephone
- nickname: $nickname
- username: $username
- createdAt: $createdAt
- openid: $openid
- id: $id
- avatar: $avatar
- ) {
- email
- updatedAt
- password
- telephone
- nickname
- username
- createdAt
- openid
- id
- avatar
- }
- }
- `;
- const UPDATE_USER = `
- mutation USER($email: String, $updatedAt: String, $telephone: String, $nickname: String, $openid: String, $id: ID!, $avatar: String) {
- update_user(
- id: $id
- email: $email
- updatedAt: $updatedAt
- telephone: $telephone
- nickname: $nickname
- openid: $openid
- avatar: $avatar
- ) {
- email
- updatedAt
- password
- telephone
- nickname
- username
- createdAt
- openid
- id
- avatar
- }
- }
- `;
- const SHOW_SCHEMA = `
- query SCHEMA($user_id: ID) {
- schema_by_props(user_id: $user_id) {
- schemaData
- schemaName
- id
- reference
- schemaState
- }
- }
- `;
- const SHOW_ALL_SCHEMA = `
- query SCHEMA($user_id: ID) {
- userSchema:schema_by_props(user_id: $user_id) {
- schemaData
- schemaName
- id
- reference
- schemaState
- }
- caseSchema:schema_by_props(user_id: "ioobot") {
- schemaData
- schemaName
- id
- reference
- schemaState
- }
- }
- `;
- const SEARCH_SCHEMA = `
- query SCHEMA($id: ID!) {
- schema_by_id(id: $id) {
- schemaName
- schemaData
- id
- reference
- schemaState
- }
- }
- `;
- const ADD_SCHEMA = `
- mutation SCHEMA($id: ID!, $user_id: ID!, $schemaName: String!, $schemaData: String!, $createdAt: String, $updatedAt: String, $schemaState: String, $reference: String) {
- create_schema(
- id: $id,
- user_id: $user_id,
- schemaName: $schemaName,
- createdAt: $createdAt,
- updatedAt: $updatedAt,
- schemaData: $schemaData,
- schemaState: $schemaState
- reference: $reference
- ) {
- schemaName,
- schemaData
- id
- reference
- schemaState
- }
- }
- `;
- const DELETE_SCHEMA = `
- mutation SCHEMA($schemaName: String, $user_id: ID) {
- delete_schema(schemaName: $schemaName, user_id: $user_id)
- }
- `;
- const UPDATE_SCHEMA = `
- mutation SCHEMA($id: ID!, $schemaData: String!, $updatedAt: String, $schemaState: String) {
- update_schema(
- id: $id,
- updatedAt: $updatedAt,
- schemaData: $schemaData,
- schemaState: $schemaState
- ) {
- schemaName,
- schemaData
- id
- schemaState
- }
- }
- `;
- const UPDATE_SCHEMA_NAME = `
- mutation SCHEMA($id: ID!, $schemaName: String, $updatedAt: String) {
- update_schema(
- id: $id,
- updatedAt: $updatedAt,
- schemaName: $schemaName,
- ) {
- schemaName,
- id
- schemaState
- }
- }
- `;
- const SHOW_TABLE = `
- query TABLE($schema_id: ID!) {
- schema_by_id(id: $schema_id) {
- schemaData
- schemaName
- reference
- schemaState
- }
- }
- `;
- const ADD_CLOUD = `
- mutation CLOUD($id: ID!, $user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $updatedAt: String, $createdAt: String, $appId: String) {
- create_cloud(
- id: $id
- user_id: $user_id
- cloudName: $cloudName
- secretId: $secretId
- secretKey: $secretKey
- createdAt: $createdAt
- updatedAt: $updatedAt
- appId: $appId
- ) {
- id
- cloudName
- secretId
- secretKey
- appId
- }
- }
- `;
- const SHOW_CLOUD = `
- query CLOUD($user_id: ID!) {
- cloud_by_props(user_id: $user_id) {
- id
- cloudName
- secretId
- secretKey
- appId
- }
- }
- `;
- const UPDATE_CLOUD = `
- mutation updatecloud($id: ID, $secretId: String, $secretKey: String $updatedAt: String, $appId: String) {
- update_cloud(
- id: $id
- secretId: $secretId
- secretKey: $secretKey
- updatedAt: $updatedAt
- appId: $appId
- ) {
- id
- cloudName
- secretId
- secretKey
- appId
- }
- }
- `;
- const SHOW_DEPLOY = `
- query DEPLOY($cloud_id: ID!) {
- deploy_by_props(cloud_id: $cloud_id) {
- id
- functionName
- region
- description
- cosBucketName
- cosObjectName
- cosBucketRegion
- handler
- memorySize
- timeout
- vpcId
- subnetId
- }
- }
- `;
- const ADD_DEPLOY = `
- mutation DEPLOY($serviceName:String, $description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $id: ID!, $cloud_id: ID, $user_id: ID, $timeout: Int, $handler: String, $functionName: String) {
- create_deploy(
- id: $id
- description: $description
- cosBucketName: $cosBucketName
- memorySize: $memorySize
- fc_id: $fc_id
- subnetId: $subnetId
- cosObjectName: $cosObjectName
- region: $region
- vpcId: $vpcId
- cosBucketRegion: $cosBucketRegion
- cloud_id: $cloud_id
- user_id: $user_id
- timeout: $timeout
- handler: $handler
- functionName: $functionName
- serviceName: $serviceName
- createdAt: $createdAt
- updatedAt: $updatedAt
- ) {
- id
- }
- }
- `;
- const UPDATE_DEPLOY = `
- mutation DEPLOY($id: ID!, $description: String, $updatedAt: String, $cosBucketName: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $functionName: String) {
- update_deploy(
- id: $id
- description: $description
- cosBucketName: $cosBucketName
- subnetId: $subnetId
- cosObjectName: $cosObjectName
- region: $region
- vpcId: $vpcId
- cosBucketRegion: $cosBucketRegion
- functionName: $functionName
- updatedAt: $updatedAt
- ) {
- id
- }
- }
- `;
- const SHOW_APIGWGROUP = `
- query GROUP($schema_id: ID!) {
- apiGWGroup_by_props(schema_id: $schema_id) {
- id
- groupName
- region
- frontType
- defaultDomain
- userStatus
- userDomain
-
- }
- }
- `;
- const ADD_APIGROUP = `
- mutation GROUP($serviceId: String, $environmentName: String, $userStatus: String, $defaultDomain: String, $updatedAt: String, $userDomain: String, $groupName: String, $createdAt: String, $frontType: String, $region: String, $status: String, $id: ID!, $cloud_id: ID, $user_id: ID) {
- create_apiGWGroup(
- id: $id
- userStatus: $userStatus
- defaultDomain: $defaultDomain
- updatedAt: $updatedAt
- userDomain: $userDomain
- groupName: $groupName
- createdAt: $createdAt
- frontType: $frontType
- region: $region
- status: $status
- cloud_id: $cloud_id
- user_id: $user_id
- environmentName: $environmentName
- serviceId: $serviceId
- ) {
- id
- }
- }
- `;
- const UPDATE_APIGROUP = `
- mutation GROUP($id:ID!, $environmentName: String, $userStatus: String, $updatedAt: String, $userDomain: String, $groupName: String, $frontType: String, $region: String) {
- update_apiGWGroup(
- id: $id
- userStatus: $userStatus
- userDomain: $userDomain
- groupName: $groupName
- frontType: $frontType
- region: $region
- environmentName: $environmentName
- updatedAt: $updatedAt
- ) {
- id
- }
- }
- `;
- const SHOW_APIGWPATH = `
- query PATH($apiGWGroup_id: ID!) {
- apiGWPath_by_props(apiGWGroup_id: $apiGWGroup_id) {
- id
- apiGWName
- apiGWDesc
- requestMethod
- }
- }
- `;
- const ADD_APIGWPATH = `
- mutation PATH($apiId: String, $apiGWName: String, $updatedAt: String, $apiGWGroup_id: ID, $createdAt: String, $deploy_id: ID, $serviceType: String, $id: ID!, $apiGWPath: String, $user_id: ID, $timeout: Int, $apiGWDesc: String, $requestMethod: String) {
- create_apiGWPath(
- apiGWName: $apiGWName
- updatedAt: $updatedAt
- apiGWGroup_id: $apiGWGroup_id
- createdAt: $createdAt
- deploy_id: $deploy_id
- serviceType: $serviceType
- id: $id
- apiGWPath: $apiGWPath
- user_id: $user_id
- timeout: $timeout
- apiGWDesc: $apiGWDesc
- requestMethod: $requestMethod
- apiId: $apiId
- ) {
- id
- }
- }
- `;
- const UPDATE_APIGWPATH = `
- mutation PATH($apiGWName: String, $updatedAt: String, $apiGWDesc: String, $requestMethod: String) {
- update_apiGWPath(
- apiGWName: $apiGWName
- apiGWDesc: $apiGWDesc
- requestMethod: $requestMethod
- updatedAt: $updatedAt
- ) {
- id
- }
- }
- `;
- const SHOW_FC_SCHEMA = `
- query FC($schema_id: ID!) {
- fc_by_props(schema_id: $schema_id) {
- cloud_id {
- id
- cloudName
- }
- }
- }
- `;
- const SHOW_FC_CONFIG = `
- query FC($wxConfig_id: ID!) {
- fc_by_props(wxConfig_id: $wxConfig_id) {
- cloud_id {
- id
- cloudName
- }
- }
- }
- `;
- const SHOW_ALL_WXCONFIG = `
- query WXCONFIG($user_id: ID) {
- userWxConfig:wxConfig_by_props(user_id: $user_id) {
- appID
- appName
- appSecret
- attach
- body
- enter_url
- id
- mch_id
- notify_url
- pay_api_key
- spbill_create_ip
- token
- welcome_words
- }
- caseWxConfig:wxConfig_by_props(user_id: "ioobot") {
- appID
- appName
- appSecret
- attach
- body
- enter_url
- id
- mch_id
- notify_url
- pay_api_key
- spbill_create_ip
- token
- welcome_words
- }
- }
- `;
- const SHOW_WXCONFIG = `
- query WXCONFIG($user_id: ID) {
- wxConfig_by_props(user_id: $user_id) {
- appID
- appName
- appSecret
- attach
- body
- enter_url
- id
- mch_id
- notify_url
- pay_api_key
- spbill_create_ip
- token
- welcome_words
- }
- }
- `;
- const ADD_WXCONFIG = `
- mutation createwxConfig($updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $createdAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $id: ID!, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String) {
- create_wxConfig(
- updatedAt: $updatedAt
- mch_id: $mch_id
- appName: $appName
- notify_url: $notify_url
- appSecret: $appSecret
- createdAt: $createdAt
- appID: $appID
- token: $token
- spbill_create_ip: $spbill_create_ip
- enter_url: $enter_url
- id: $id
- pay_api_key: $pay_api_key
- user_id: $user_id
- body: $body
- welcome_words: $welcome_words
- attach: $attach
- ) {
- mch_id
- appName
- notify_url
- appSecret
- appID
- token
- spbill_create_ip
- enter_url
- id
- pay_api_key
- body
- welcome_words
- attach
- }
- }
- `;
- const SHOW_WXCONTENT = `
- query wxConfigbyid($id: ID) {
- wxConfig_by_id(id: $id) {
- mch_id
- appName
- notify_url
- appSecret
- appID
- token
- spbill_create_ip
- enter_url
- id
- pay_api_key
- body
- welcome_words
- attach
- }
- }
- `;
- const UPDATE_WXCONFIG = `
- mutation updatewxConfig($id: ID, $updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $pay_api_key: String, $body: String, $welcome_words: String, $attach: String) {
- update_wxConfig(
- id: $id
- updatedAt: $updatedAt
- mch_id: $mch_id
- appName: $appName
- notify_url: $notify_url
- appSecret: $appSecret
- appID: $appID
- token: $token
- spbill_create_ip: $spbill_create_ip
- enter_url: $enter_url
- pay_api_key: $pay_api_key
- body: $body
- welcome_words: $welcome_words
- attach: $attach
- ) {
- id
- mch_id
- appName
- notify_url
- appSecret
- appID
- token
- spbill_create_ip
- enter_url
- pay_api_key
- body
- welcome_words
- attach
- }
- }
- `;
- const DELETE_WXCONFIG = `
- mutation deletewxConfig($id: ID) {
- delete_wxConfig(id: $id)
- }
- `;
- const GET_PROJECT = `
- query projectbyid($id: ID) {
- project_by_id(id: $id) {
- updatedAt
- database_id {
- id
- }
- apiGWGroup_id {
- id
- groupName
- region
- frontType
- defaultDomain
- userStatus
- userDomain
- }
- projectName
- deploy_id {
- description
- updatedAt
- cosBucketName
- memorySize
- createdAt
- subnetId
- cosObjectName
- region
- vpcId
- cosBucketRegion
- id
- serviceName
- timeout
- handler
- functionName
- }
- id
- projectType
- cloud_id {
- id
- cloudName
- secretId
- secretKey
- appId
- createdAt
- updatedAt
- }
- user_id {
- id
- }
- wxConfig_id {
- updatedAt
- mch_id
- appName
- notify_url
- appSecret
- createdAt
- appID
- token
- spbill_create_ip
- enter_url
- id
- pay_api_key
- body
- welcome_words
- attach
- }
- schema_id {
- updatedAt
- schemaState
- createdAt
- schemaName
- reference
- id
- schemaData
- }
- }
- }
- `;
- export {
- ADD_USER,
- GET_USER,
- SEARCH_USER,
- UPDATE_USER,
- SEARCH_SCHEMA,
- ADD_SCHEMA,
- SHOW_ALL_SCHEMA,
- SHOW_SCHEMA,
- UPDATE_SCHEMA,
- UPDATE_SCHEMA_NAME,
- DELETE_SCHEMA,
- SHOW_TABLE,
- ADD_CLOUD,
- SHOW_CLOUD,
- UPDATE_CLOUD,
- SHOW_DEPLOY,
- ADD_DEPLOY,
- UPDATE_DEPLOY,
- SHOW_APIGWGROUP,
- ADD_APIGROUP,
- UPDATE_APIGROUP,
- SHOW_APIGWPATH,
- ADD_APIGWPATH,
- UPDATE_APIGWPATH,
- SHOW_FC_SCHEMA,
- SHOW_FC_CONFIG,
- SHOW_ALL_WXCONFIG,
- SHOW_WXCONFIG,
- ADD_WXCONFIG,
- SHOW_WXCONTENT,
- UPDATE_WXCONFIG,
- DELETE_WXCONFIG,
- GET_PROJECT
- }
|