Test mutation with input type Upload
See original GitHub issueHi, I want to test my mutation which have input type Upload. How to do that with EasyGraphQL?
I know we can pass the expected input on the third parameter (after Call test from tester).
const EasyGraphQLTester = require('easygraphql-tester')
const fs = require('fs')
const path = require('path')
const schemaCode = fs.readFileSync(path.join(__dirname, 'schema', 'schema.gql'), 'utf8')
const tester = new EasyGraphQLTester(schemaCode)
const mutation = `
mutation CreateUser{
createUser {
email
}
}
`
tester.test(true, mutation, {
banner: '',
username: 'test',
fullName: 'test',
password: 'test'
})
on that above case… if banner is input type Upload, how to do that in easygraphql?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Mutations and Input Types - GraphQL
It's often convenient to have a mutation that maps to a database create or update operation, like setMessage , return the same thing...
Read more >File uploads - Apollo GraphQL Docs
WARNING: The file upload mechanism described in this file (which we removed in Apollo Server 3) inherently exposes your server to CSRF mutation...
Read more >Input object type as an argument for GraphQL mutations and ...
We will concentrate on the often misunderstood topic of using GraphQL input object types in mutations. Input and output types. According to GraphQL ......
Read more >Can Upload scalar be part of a GraphQL input type? #117
Hello. This is shown as an example for uploading schema: type File { id: ID! path: String! filename: String! mimetype: String! }
Read more >How to upload files in a GraphQL mutation nested inputs?
input PostInputs { id: ID! name: String! images: [ImageInputs!]! } input ImageInputs { id: ID! file: Upload! alt_name: String! } type Mutation { ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@harked @estrada9166 I’m working on it.
@estrada9166 sorry for so late reply. It works for me. Thanks. I’ll close this issue now.