gql.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  1. // 注意是否使用 gql
  2. // apollo client 需要使用 gql
  3. // graphql-request 不需要使用 gql
  4. // import gql from "graphql-tag";
  5. const GET_USER = `
  6. query USER($id: ID!) {
  7. user_by_id(id: $id) {
  8. email
  9. updatedAt
  10. password
  11. telephone
  12. nickname
  13. username
  14. createdAt
  15. openid
  16. id
  17. avatar
  18. }
  19. }
  20. `;
  21. const SEARCH_USER = `
  22. query USER($username: String) {
  23. user_by_props(username: $username) {
  24. email
  25. updatedAt
  26. password
  27. telephone
  28. nickname
  29. username
  30. createdAt
  31. openid
  32. id
  33. avatar
  34. }
  35. }
  36. `;
  37. const ADD_USER = `
  38. mutation USER($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $avatar: String) {
  39. create_user(
  40. email: $email
  41. updatedAt: $updatedAt
  42. password: $password
  43. telephone: $telephone
  44. nickname: $nickname
  45. username: $username
  46. createdAt: $createdAt
  47. openid: $openid
  48. id: $id
  49. avatar: $avatar
  50. ) {
  51. email
  52. updatedAt
  53. password
  54. telephone
  55. nickname
  56. username
  57. createdAt
  58. openid
  59. id
  60. avatar
  61. }
  62. }
  63. `;
  64. const UPDATE_USER = `
  65. mutation USER($email: String, $updatedAt: String, $telephone: String, $nickname: String, $openid: String, $id: ID!, $avatar: String) {
  66. update_user(
  67. id: $id
  68. email: $email
  69. updatedAt: $updatedAt
  70. telephone: $telephone
  71. nickname: $nickname
  72. openid: $openid
  73. avatar: $avatar
  74. ) {
  75. email
  76. updatedAt
  77. password
  78. telephone
  79. nickname
  80. username
  81. createdAt
  82. openid
  83. id
  84. avatar
  85. }
  86. }
  87. `;
  88. const SHOW_SCHEMA = `
  89. query SCHEMA($user_id: ID) {
  90. schema_by_props(user_id: $user_id) {
  91. schemaData
  92. schemaName
  93. id
  94. reference
  95. schemaState
  96. }
  97. }
  98. `;
  99. const SHOW_CASE_SCHEMA = `
  100. query SHOW_CASE_SCHEMA {
  101. caseSchema:schema_by_props(user_id: "ioobot") {
  102. schemaData
  103. schemaName
  104. id
  105. reference
  106. schemaState
  107. }
  108. }
  109. `;
  110. const SHOW_ALL_SCHEMA = `
  111. query SCHEMA($user_id: ID) {
  112. userSchema:schema_by_props(user_id: $user_id) {
  113. schemaData
  114. schemaName
  115. id
  116. reference
  117. schemaState
  118. }
  119. caseSchema:schema_by_props(user_id: "ioobot") {
  120. schemaData
  121. schemaName
  122. id
  123. reference
  124. schemaState
  125. }
  126. }
  127. `;
  128. const SEARCH_SCHEMA = `
  129. query SCHEMA($id: ID!) {
  130. schema_by_id(id: $id) {
  131. schemaName
  132. schemaData
  133. id
  134. reference
  135. schemaState
  136. }
  137. }
  138. `;
  139. const ADD_SCHEMA = `
  140. mutation SCHEMA($id: ID!, $user_id: ID!, $schemaName: String!, $schemaData: String!, $createdAt: String, $updatedAt: String, $schemaState: String, $reference: String) {
  141. create_schema(
  142. id: $id,
  143. user_id: $user_id,
  144. schemaName: $schemaName,
  145. createdAt: $createdAt,
  146. updatedAt: $updatedAt,
  147. schemaData: $schemaData,
  148. schemaState: $schemaState
  149. reference: $reference
  150. ) {
  151. schemaName,
  152. schemaData
  153. id
  154. reference
  155. schemaState
  156. }
  157. }
  158. `;
  159. const DELETE_SCHEMA = `
  160. mutation SCHEMA($schemaName: String, $user_id: ID) {
  161. delete_schema(schemaName: $schemaName, user_id: $user_id)
  162. }
  163. `;
  164. const UPDATE_SCHEMA = `
  165. mutation SCHEMA($id: ID!, $schemaData: String!, $updatedAt: String, $schemaState: String) {
  166. update_schema(
  167. id: $id,
  168. updatedAt: $updatedAt,
  169. schemaData: $schemaData,
  170. schemaState: $schemaState
  171. ) {
  172. schemaName,
  173. schemaData
  174. id
  175. schemaState
  176. }
  177. }
  178. `;
  179. const UPDATE_SCHEMA_PROJECT_NAME = `
  180. mutation UPDATE_SCHEMA_PROJECT_NAME($id: ID!, $schemaName: String, $updatedAt: String) {
  181. update_schema(
  182. id: $id,
  183. updatedAt: $updatedAt,
  184. schemaName: $schemaName,
  185. ) {
  186. schemaName,
  187. id
  188. schemaState
  189. }
  190. update_project(
  191. schema_id: $id,
  192. updatedAt: $updatedAt,
  193. projectName: $schemaName,
  194. ){
  195. projectName,
  196. id,
  197. schema_id{
  198. id
  199. }
  200. }
  201. }
  202. `;
  203. const ADD_PROJECT_AND_SCHEMA = `
  204. mutation ADD_PROJECT_AND_SCHEMA($schemaId: ID!, $user_id: ID!, $schemaName: String!, $schemaData: String!, $schemaCreatedAt: String, $schemaUpdatedAt: String, $schemaState: String, $reference: String,
  205. $projectCreatedAt: String, $projectUpdatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $projectName: String, $deploy_id: ID, $projectId: ID!, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
  206. create_schema(
  207. id: $schemaId,
  208. user_id: $user_id,
  209. schemaName: $schemaName,
  210. createdAt: $schemaCreatedAt,
  211. updatedAt: $schemaUpdatedAt,
  212. schemaData: $schemaData,
  213. schemaState: $schemaState
  214. reference: $reference
  215. ) {
  216. schemaName,
  217. schemaData
  218. id
  219. reference
  220. schemaState
  221. }
  222. create_project(
  223. createdAt: $projectCreatedAt,
  224. updatedAt: $projectUpdatedAt,
  225. database_id: $database_id,
  226. apiGWGroup_id: $apiGWGroup_id,
  227. projectName: $projectName,
  228. deploy_id: $deploy_id,
  229. id: $projectId,
  230. projectType: $projectType,
  231. cloud_id: $cloud_id,
  232. user_id: $user_id,
  233. wxConfig_id: $wxConfig_id,
  234. schema_id: $schema_id
  235. ) {
  236. updatedAt
  237. createdAt
  238. projectName
  239. id
  240. projectType
  241. schema_id {
  242. updatedAt
  243. schemaState
  244. authWrite
  245. authReadObjects
  246. createdAt
  247. authRead
  248. schemaName
  249. reference
  250. id
  251. schemaData
  252. authReadWrite
  253. authWriteObjects
  254. }
  255. }
  256. }
  257. `;
  258. const ADD_PROJECT_AND_WX = `
  259. mutation ADD_PROJECT_AND_WX($wxUpdatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $wxCreatedAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $wxConfigId: ID!, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String
  260. $projectCreatedAt: String, $projectUpdatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $projectName: String, $deploy_id: ID, $projectId: ID!, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
  261. create_wxConfig(
  262. createdAt: $wxCreatedAt
  263. updatedAt: $wxUpdatedAt
  264. mch_id: $mch_id
  265. appName: $appName
  266. notify_url: $notify_url
  267. appSecret: $appSecret
  268. appID: $appID
  269. token: $token
  270. spbill_create_ip: $spbill_create_ip
  271. enter_url: $enter_url
  272. id: $wxConfigId
  273. pay_api_key: $pay_api_key
  274. user_id: $user_id
  275. body: $body
  276. welcome_words: $welcome_words
  277. attach: $attach
  278. ) {
  279. mch_id
  280. appName
  281. notify_url
  282. appSecret
  283. appID
  284. token
  285. spbill_create_ip
  286. enter_url
  287. id
  288. pay_api_key
  289. body
  290. welcome_words
  291. attach
  292. }
  293. create_project(
  294. createdAt: $projectCreatedAt,
  295. updatedAt: $projectUpdatedAt,
  296. database_id: $database_id,
  297. apiGWGroup_id: $apiGWGroup_id,
  298. projectName: $projectName,
  299. deploy_id: $deploy_id,
  300. id: $projectId,
  301. projectType: $projectType,
  302. cloud_id: $cloud_id,
  303. user_id: $user_id,
  304. wxConfig_id: $wxConfig_id,
  305. schema_id: $schema_id
  306. ) {
  307. updatedAt
  308. createdAt
  309. projectName
  310. id
  311. projectType
  312. schema_id {
  313. updatedAt
  314. schemaState
  315. authWrite
  316. authReadObjects
  317. createdAt
  318. authRead
  319. schemaName
  320. reference
  321. id
  322. schemaData
  323. authReadWrite
  324. authWriteObjects
  325. }
  326. }
  327. }
  328. `;
  329. const CASE_SCHEMA_AND_PROJECT = `
  330. query CASE_SCHEMA_AND_PROJECT($user_id: ID, $projectType: String ) {
  331. caseProject:project_by_props(
  332. projectType: $projectType,
  333. user_id: "ioobot"
  334. ) {
  335. updatedAt
  336. apiGWGroup_id {
  337. id
  338. }
  339. createdAt
  340. projectName
  341. id
  342. projectType
  343. wxConfig_id {
  344. id
  345. appName
  346. }
  347. schema_id {
  348. schemaData
  349. schemaName
  350. id
  351. reference
  352. schemaState
  353. }
  354. }
  355. project:project_by_props(
  356. projectType: $projectType,
  357. user_id: $user_id
  358. ) {
  359. updatedAt
  360. apiGWGroup_id {
  361. id
  362. }
  363. createdAt
  364. projectName
  365. id
  366. projectType
  367. wxConfig_id {
  368. id
  369. appName
  370. }
  371. schema_id {
  372. id
  373. }
  374. }
  375. }
  376. `;
  377. const CASE_WXCONFIG_AND_PROJECT = `
  378. query CASE_WXCONFIG_AND_PROJECT($user_id: ID, $projectType: String ) {
  379. caseWxConfig:wxConfig_by_props(user_id: "ioobot") {
  380. appID
  381. appName
  382. appSecret
  383. attach
  384. body
  385. enter_url
  386. id
  387. mch_id
  388. notify_url
  389. pay_api_key
  390. spbill_create_ip
  391. token
  392. welcome_words
  393. }
  394. project:project_by_props(
  395. projectType: $projectType,
  396. user_id: $user_id
  397. ) {
  398. updatedAt
  399. apiGWGroup_id {
  400. id
  401. }
  402. createdAt
  403. projectName
  404. id
  405. projectType
  406. wxConfig_id {
  407. id
  408. appName
  409. }
  410. schema_id {
  411. id
  412. }
  413. }
  414. }
  415. `;
  416. const SHOW_PROJECT = `
  417. query PROJECT_BY_PROPS($projectType: String, $user_id: ID) {
  418. project:project_by_props(
  419. projectType: $projectType,
  420. user_id: $user_id
  421. ) {
  422. updatedAt
  423. apiGWGroup_id {
  424. id
  425. }
  426. createdAt
  427. projectName
  428. id
  429. projectType
  430. wxConfig_id {
  431. id
  432. }
  433. schema_id {
  434. id
  435. }
  436. }
  437. }
  438. `;
  439. const DELETE_PROJECT = `
  440. mutation DELETE_PROJECT($id: ID, $user_id: ID) {
  441. delete_project(id: $id, user_id: $user_id)
  442. }
  443. `;
  444. const SHOW_TABLE = `
  445. query TABLE($schema_id: ID!) {
  446. schema_by_id(id: $schema_id) {
  447. schemaData
  448. schemaName
  449. reference
  450. schemaState
  451. }
  452. }
  453. `;
  454. const ADD_CLOUD = `
  455. mutation CLOUD($id: ID!, $user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $updatedAt: String, $createdAt: String, $appId: String) {
  456. create_cloud(
  457. id: $id
  458. user_id: $user_id
  459. cloudName: $cloudName
  460. secretId: $secretId
  461. secretKey: $secretKey
  462. createdAt: $createdAt
  463. updatedAt: $updatedAt
  464. appId: $appId
  465. ) {
  466. id
  467. cloudName
  468. secretId
  469. secretKey
  470. appId
  471. }
  472. }
  473. `;
  474. const SHOW_CLOUD = `
  475. query CLOUD($user_id: ID!) {
  476. cloud_by_props(user_id: $user_id) {
  477. id
  478. cloudName
  479. secretId
  480. secretKey
  481. appId
  482. }
  483. }
  484. `;
  485. const UPDATE_CLOUD = `
  486. mutation updatecloud($id: ID, $secretId: String, $secretKey: String $updatedAt: String, $appId: String) {
  487. update_cloud(
  488. id: $id
  489. secretId: $secretId
  490. secretKey: $secretKey
  491. updatedAt: $updatedAt
  492. appId: $appId
  493. ) {
  494. id
  495. cloudName
  496. secretId
  497. secretKey
  498. appId
  499. }
  500. }
  501. `;
  502. const SHOW_DEPLOY = `
  503. query DEPLOY($cloud_id: ID!) {
  504. deploy_by_props(cloud_id: $cloud_id) {
  505. id
  506. functionName
  507. region
  508. description
  509. cosBucketName
  510. cosObjectName
  511. cosBucketRegion
  512. handler
  513. memorySize
  514. timeout
  515. vpcId
  516. subnetId
  517. }
  518. }
  519. `;
  520. const ADD_DEPLOY = `
  521. 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) {
  522. create_deploy(
  523. id: $id
  524. description: $description
  525. cosBucketName: $cosBucketName
  526. memorySize: $memorySize
  527. fc_id: $fc_id
  528. subnetId: $subnetId
  529. cosObjectName: $cosObjectName
  530. region: $region
  531. vpcId: $vpcId
  532. cosBucketRegion: $cosBucketRegion
  533. cloud_id: $cloud_id
  534. user_id: $user_id
  535. timeout: $timeout
  536. handler: $handler
  537. functionName: $functionName
  538. serviceName: $serviceName
  539. createdAt: $createdAt
  540. updatedAt: $updatedAt
  541. ) {
  542. id
  543. }
  544. }
  545. `;
  546. const UPDATE_DEPLOY = `
  547. mutation DEPLOY($id: ID!, $description: String, $updatedAt: String, $cosBucketName: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $functionName: String) {
  548. update_deploy(
  549. id: $id
  550. description: $description
  551. cosBucketName: $cosBucketName
  552. subnetId: $subnetId
  553. cosObjectName: $cosObjectName
  554. region: $region
  555. vpcId: $vpcId
  556. cosBucketRegion: $cosBucketRegion
  557. functionName: $functionName
  558. updatedAt: $updatedAt
  559. ) {
  560. id
  561. }
  562. }
  563. `;
  564. const SHOW_APIGWGROUP = `
  565. query GROUP($schema_id: ID!) {
  566. apiGWGroup_by_props(schema_id: $schema_id) {
  567. id
  568. groupName
  569. region
  570. frontType
  571. defaultDomain
  572. userStatus
  573. userDomain
  574. }
  575. }
  576. `;
  577. const ADD_APIGROUP = `
  578. 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) {
  579. create_apiGWGroup(
  580. id: $id
  581. userStatus: $userStatus
  582. defaultDomain: $defaultDomain
  583. updatedAt: $updatedAt
  584. userDomain: $userDomain
  585. groupName: $groupName
  586. createdAt: $createdAt
  587. frontType: $frontType
  588. region: $region
  589. status: $status
  590. cloud_id: $cloud_id
  591. user_id: $user_id
  592. environmentName: $environmentName
  593. serviceId: $serviceId
  594. ) {
  595. id
  596. }
  597. }
  598. `;
  599. const UPDATE_APIGROUP = `
  600. mutation GROUP($id:ID!, $environmentName: String, $userStatus: String, $updatedAt: String, $userDomain: String, $groupName: String, $frontType: String, $region: String) {
  601. update_apiGWGroup(
  602. id: $id
  603. userStatus: $userStatus
  604. userDomain: $userDomain
  605. groupName: $groupName
  606. frontType: $frontType
  607. region: $region
  608. environmentName: $environmentName
  609. updatedAt: $updatedAt
  610. ) {
  611. id
  612. }
  613. }
  614. `;
  615. const SHOW_APIGWPATH = `
  616. query PATH($apiGWGroup_id: ID!) {
  617. apiGWPath_by_props(apiGWGroup_id: $apiGWGroup_id) {
  618. id
  619. apiGWName
  620. apiGWDesc
  621. requestMethod
  622. }
  623. }
  624. `;
  625. const ADD_APIGWPATH = `
  626. 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) {
  627. create_apiGWPath(
  628. apiGWName: $apiGWName
  629. updatedAt: $updatedAt
  630. apiGWGroup_id: $apiGWGroup_id
  631. createdAt: $createdAt
  632. deploy_id: $deploy_id
  633. serviceType: $serviceType
  634. id: $id
  635. apiGWPath: $apiGWPath
  636. user_id: $user_id
  637. timeout: $timeout
  638. apiGWDesc: $apiGWDesc
  639. requestMethod: $requestMethod
  640. apiId: $apiId
  641. ) {
  642. id
  643. }
  644. }
  645. `;
  646. const UPDATE_APIGWPATH = `
  647. mutation PATH($apiGWName: String, $updatedAt: String, $apiGWDesc: String, $requestMethod: String) {
  648. update_apiGWPath(
  649. apiGWName: $apiGWName
  650. apiGWDesc: $apiGWDesc
  651. requestMethod: $requestMethod
  652. updatedAt: $updatedAt
  653. ) {
  654. id
  655. }
  656. }
  657. `;
  658. const SHOW_FC_SCHEMA = `
  659. query FC($schema_id: ID!) {
  660. fc_by_props(schema_id: $schema_id) {
  661. cloud_id {
  662. id
  663. cloudName
  664. }
  665. }
  666. }
  667. `;
  668. const SHOW_FC_CONFIG = `
  669. query FC($wxConfig_id: ID!) {
  670. fc_by_props(wxConfig_id: $wxConfig_id) {
  671. cloud_id {
  672. id
  673. cloudName
  674. }
  675. }
  676. }
  677. `;
  678. const SHOW_ALL_WXCONFIG = `
  679. query WXCONFIG($user_id: ID) {
  680. userWxConfig:wxConfig_by_props(user_id: $user_id) {
  681. appID
  682. appName
  683. appSecret
  684. attach
  685. body
  686. enter_url
  687. id
  688. mch_id
  689. notify_url
  690. pay_api_key
  691. spbill_create_ip
  692. token
  693. welcome_words
  694. }
  695. caseWxConfig:wxConfig_by_props(user_id: "ioobot") {
  696. appID
  697. appName
  698. appSecret
  699. attach
  700. body
  701. enter_url
  702. id
  703. mch_id
  704. notify_url
  705. pay_api_key
  706. spbill_create_ip
  707. token
  708. welcome_words
  709. }
  710. }
  711. `;
  712. const SHOW_WXCONFIG = `
  713. query WXCONFIG($user_id: ID) {
  714. wxConfig_by_props(user_id: $user_id) {
  715. appID
  716. appName
  717. appSecret
  718. attach
  719. body
  720. enter_url
  721. id
  722. mch_id
  723. notify_url
  724. pay_api_key
  725. spbill_create_ip
  726. token
  727. welcome_words
  728. }
  729. }
  730. `;
  731. const ADD_WXCONFIG = `
  732. 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) {
  733. create_wxConfig(
  734. updatedAt: $updatedAt
  735. mch_id: $mch_id
  736. appName: $appName
  737. notify_url: $notify_url
  738. appSecret: $appSecret
  739. createdAt: $createdAt
  740. appID: $appID
  741. token: $token
  742. spbill_create_ip: $spbill_create_ip
  743. enter_url: $enter_url
  744. id: $id
  745. pay_api_key: $pay_api_key
  746. user_id: $user_id
  747. body: $body
  748. welcome_words: $welcome_words
  749. attach: $attach
  750. ) {
  751. mch_id
  752. appName
  753. notify_url
  754. appSecret
  755. appID
  756. token
  757. spbill_create_ip
  758. enter_url
  759. id
  760. pay_api_key
  761. body
  762. welcome_words
  763. attach
  764. }
  765. }
  766. `;
  767. const SHOW_WXCONTENT = `
  768. query wxConfigbyid($id: ID) {
  769. wxConfig_by_id(id: $id) {
  770. mch_id
  771. appName
  772. notify_url
  773. appSecret
  774. appID
  775. token
  776. spbill_create_ip
  777. enter_url
  778. id
  779. pay_api_key
  780. body
  781. welcome_words
  782. attach
  783. }
  784. }
  785. `;
  786. const UPDATE_WXCONFIG = `
  787. 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) {
  788. update_wxConfig(
  789. id: $id
  790. updatedAt: $updatedAt
  791. mch_id: $mch_id
  792. appName: $appName
  793. notify_url: $notify_url
  794. appSecret: $appSecret
  795. appID: $appID
  796. token: $token
  797. spbill_create_ip: $spbill_create_ip
  798. enter_url: $enter_url
  799. pay_api_key: $pay_api_key
  800. body: $body
  801. welcome_words: $welcome_words
  802. attach: $attach
  803. ) {
  804. id
  805. mch_id
  806. appName
  807. notify_url
  808. appSecret
  809. appID
  810. token
  811. spbill_create_ip
  812. enter_url
  813. pay_api_key
  814. body
  815. welcome_words
  816. attach
  817. }
  818. }
  819. `;
  820. const DELETE_WXCONFIG = `
  821. mutation deletewxConfig($id: ID) {
  822. delete_wxConfig(id: $id)
  823. }
  824. `;
  825. const GET_PROJECT = `
  826. query projectbyid($id: ID) {
  827. project_by_id(id: $id) {
  828. updatedAt
  829. database_id {
  830. id
  831. }
  832. apiGWGroup_id {
  833. id
  834. groupName
  835. region
  836. frontType
  837. defaultDomain
  838. userStatus
  839. userDomain
  840. }
  841. projectName
  842. deploy_id {
  843. description
  844. updatedAt
  845. cosBucketName
  846. memorySize
  847. createdAt
  848. subnetId
  849. cosObjectName
  850. region
  851. vpcId
  852. cosBucketRegion
  853. id
  854. serviceName
  855. timeout
  856. handler
  857. functionName
  858. }
  859. id
  860. projectType
  861. cloud_id {
  862. id
  863. cloudName
  864. secretId
  865. secretKey
  866. appId
  867. createdAt
  868. updatedAt
  869. }
  870. user_id {
  871. id
  872. }
  873. wxConfig_id {
  874. updatedAt
  875. mch_id
  876. appName
  877. notify_url
  878. appSecret
  879. createdAt
  880. appID
  881. token
  882. spbill_create_ip
  883. enter_url
  884. id
  885. pay_api_key
  886. body
  887. welcome_words
  888. attach
  889. }
  890. schema_id {
  891. updatedAt
  892. schemaState
  893. createdAt
  894. schemaName
  895. reference
  896. id
  897. schemaData
  898. }
  899. }
  900. }
  901. `;
  902. export {
  903. ADD_USER,
  904. GET_USER,
  905. SEARCH_USER,
  906. UPDATE_USER,
  907. SEARCH_SCHEMA,
  908. ADD_SCHEMA,
  909. SHOW_CASE_SCHEMA,
  910. SHOW_ALL_SCHEMA,
  911. SHOW_SCHEMA,
  912. UPDATE_SCHEMA,
  913. UPDATE_SCHEMA_PROJECT_NAME,
  914. DELETE_SCHEMA,
  915. DELETE_PROJECT,
  916. SHOW_TABLE,
  917. ADD_PROJECT_AND_SCHEMA,
  918. CASE_SCHEMA_AND_PROJECT,
  919. CASE_WXCONFIG_AND_PROJECT,
  920. SHOW_PROJECT,
  921. ADD_CLOUD,
  922. SHOW_CLOUD,
  923. UPDATE_CLOUD,
  924. SHOW_DEPLOY,
  925. ADD_DEPLOY,
  926. UPDATE_DEPLOY,
  927. SHOW_APIGWGROUP,
  928. ADD_APIGROUP,
  929. UPDATE_APIGROUP,
  930. SHOW_APIGWPATH,
  931. ADD_APIGWPATH,
  932. UPDATE_APIGWPATH,
  933. SHOW_FC_SCHEMA,
  934. SHOW_FC_CONFIG,
  935. ADD_PROJECT_AND_WX,
  936. SHOW_ALL_WXCONFIG,
  937. SHOW_WXCONFIG,
  938. ADD_WXCONFIG,
  939. SHOW_WXCONTENT,
  940. UPDATE_WXCONFIG,
  941. DELETE_WXCONFIG,
  942. GET_PROJECT
  943. }