I'm using crypto-js to hash data and send it by apollo-angular to express-graphql.
I tried to send it as string using method toString() which fails 90 out of 100 even with async,await returning empty string. Then split object into two variables one as array of int, second as int. Without success as it still show same error even when type of accepted query is Int. Also tried make it array of strings even tho typeof is string , graphql recognize it as int.
Apollo mutation:
return this.apollo.mutate<Query>({
errorPolicy: 'all',
mutation: gql`
mutation Mutation{
signUp(words:${words},sigBytes:${sigBytes})
}`
});
Schema type for arrays:
type Crypto{
words: Int!
}
type Mutation {
signUp(words: [Crypto] ,sigBytes: Int!): Int,
}
Schema type for all words as string:
signUp(words: String! ,sigBytes: Int!): String,
Expected output is to send whole data to express to decrypt it back.
There is only this error:
GraphQLError {message: "Syntax Error: Expected Name, found Int "-379818220"",