Comments (12)
Thanks for sharing!
from xkojimedia.github.io.
@Justas-Kaulakis you would have to split out your input object. Following the example you shared,
input MemberInput {
fullName: String!
description: String!
image: Upload
}
mutation CreateMember($fullName: String!, $description: String!, $image: Upload) {
createMember(input: {
fullName: $fullName,
description: $description,
image: $image
}) {
id
fullName
imageId
description
createdAt
}
}
from xkojimedia.github.io.
Thank you so much for writing this and creating altair. I was able to figure out the file upload to work on one of my projects.
from xkojimedia.github.io.
Awesome! Glad it helped.
from xkojimedia.github.io.
Thank you creating Altair it's really awesome one of the reasons I used is because it provides way to upload files but when the window opens for choosing the in file explorer we can't see the normal file explorer interface like texts are in form of squares I'm using Manjaro distro
from xkojimedia.github.io.
Hey! Sorry to hear that. You can create an issue in the repo with more details including screenshots so we can discuss it in more details π https://github.com/imolorhe/altair/issues
from xkojimedia.github.io.
if I want send other formdata how can I write graphql with Altair?
mutation($file:[Upload]){
createDocument(multipartBody:$file){
documentName
fileDownloadUrl
}
}
like this only upload file
from xkojimedia.github.io.
@wangxinru how do you mean other form data? Is this other form data supported in the GraphQL spec? The file upload implementation is a specific spec for file upload support. I'm not aware of any other form data related specifications.
from xkojimedia.github.io.
Great docs!
Im just not sure how to name the "file name" input if my mutation accepts an object containing the file as a parameter?
input MemberInput {
fullName: String!
description: String!
image: Upload
}
mutation CreateMember($input: MemberInput!) {
createMember(input: $input) {
id
fullName
imageId
description
createdAt
}
}
from xkojimedia.github.io.
Unhandled Rejection (Error): Validation error of type VariableTypeMismatch: Variable type 'Upload' doesn't match expected type '[Upload]' @ 'createUploadCoverImage'
When I use this , I get this error
from xkojimedia.github.io.
@webDeveloper-619 you're mixing the Upload
type with the list form [Upload]
which is used for multiple uploads. You can try using the little toggle button beside the file name to switch between single file mode Upload
and multiple file mode [Upload]
from xkojimedia.github.io.
Can you please share how the SDL looks like in the case of file upload. I created a custom scalar type and defined that with MultipartFile and getting 422 unprocessed entity error when trying to hit from Altair
from xkojimedia.github.io.
Related Issues (6)
- blog/set-up-a-blog-with-gatsby-github-pages-and-github-actions/
- blog/unit-testing-javascript-applications-part-1/
- blog/unit-testing-javascript-applications---part-3/ HOT 2
- blog/theming-in-altair-graphql/ HOT 2
- blog/introducing-team-collaboration--share-queries-and-collections-with-altair-graphql/ HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xkojimedia.github.io.