odl-graphql-client
Advanced tools
Comparing version 1.0.0-rc.5 to 1.0.0-rc.6
@@ -53,3 +53,4 @@ import upperFirst from "lodash/fp/upperFirst"; | ||
payloadModel: any, | ||
onGetVariableType: (variableKey: string) => string | ||
variable: any, | ||
selectedFields?: string[] | ||
) => { | ||
@@ -59,10 +60,13 @@ const mutationVariables = this.getMutationVariables(payloadModel); | ||
mutationVariables, | ||
onGetVariableType | ||
variable | ||
); | ||
const fields = convertSelectFieldsArrayToString( | ||
selectedFields || ["didSuccess", "errorCode"] | ||
); | ||
return `mutation${declareVariables} { | ||
${entityName} { | ||
${operationName}${inputVariables} { | ||
didSuccess | ||
errorCode | ||
${fields} | ||
} | ||
@@ -69,0 +73,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.0.0-rc.5", | ||
"version": "1.0.0-rc.6", | ||
"dependencies": { | ||
@@ -10,0 +10,0 @@ "graphql-request": "^1.8.2", |
@@ -16,3 +16,3 @@ import keys from "lodash/fp/keys"; | ||
variables: QueryVariables | MutationVariables | CountQueryVariables, | ||
onGetVariableType?: (variableKey: string) => string | ||
variable?: any | ||
): GraphQLVariable => { | ||
@@ -22,4 +22,3 @@ const variableKeys = keys(variables); | ||
const declareVariables = variableKeys.map((paramKey) => { | ||
const getVariableTypeFunc = onGetVariableType || getVariableType; | ||
const paramType = getVariableTypeFunc(paramKey); | ||
const paramType = get(paramKey)(variable || SUPPORTED_VARIABLES_TYPE); | ||
return `$${paramKey}: ${paramType}`; | ||
@@ -26,0 +25,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
498
16947