File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 3131 "sinon" : " ^9.0.0"
3232 },
3333 "dependencies" : {
34- "graphql-tag" : " ^2.12.6" ,
3534 "rewiremock" : " ^3.14.5" ,
3635 "screwdriver-request" : " ^2.0.1"
3736 },
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- const gql = require ( 'graphql-tag' ) ;
4-
5- module . exports . GetEnterpriseUserAccount = gql `
3+ module . exports . GetEnterpriseUserAccount = `
64 query GetEnterpriseUserAccount($login: String!) {
75 user(login: $login) {
86 name
@@ -25,7 +23,7 @@ module.exports.GetEnterpriseUserAccount = gql`
2523` ;
2624
2725// needs `admin:enterprise` scope for EAU fragment
28- module . exports . ListEnterpriseMembers = gql `
26+ module . exports . ListEnterpriseMembers = `
2927 query ListEnterpriseMembers($slug: String!, $cursor: String) {
3028 enterprise(slug: $slug) {
3129 name
@@ -68,7 +66,7 @@ module.exports.ListEnterpriseMembers = gql`
6866 }
6967` ;
7068
71- module . exports . GetUser = gql `
69+ module . exports . GetUser = `
7270 query GetUser($login: String!) {
7371 user(login: $login) {
7472 name
Original file line number Diff line number Diff line change @@ -40,14 +40,10 @@ class SDGraphQLClient {
4040 context : {
4141 token
4242 } ,
43- json : JSON . stringify ( { query, variables } ) ,
43+ json : { query, variables } ,
4444 ...options
4545 } ) ;
4646
47- if ( res . body . errors ) {
48- throw new Error ( res . body . errors ) ;
49- }
50-
5147 return res . body ;
5248 }
5349
@@ -68,14 +64,10 @@ class SDGraphQLClient {
6864 context : {
6965 token
7066 } ,
71- json : JSON . stringify ( { mutation, variables } ) ,
67+ json : { mutation, variables } ,
7268 ...options
7369 } ) ;
7470
75- if ( res . body . errors ) {
76- throw new Error ( res . body . errors ) ;
77- }
78-
7971 return res . body ;
8072 }
8173}
You can’t perform that action at this time.
0 commit comments