Apollo-server: Unknown type "Upload". Did you mean "Float"?

Created on 3 Jun 2019  路  4Comments  路  Source: apollographql/apollo-server

I followed this post.

And this is my graphql schema:

extend type Mutation {
  bannerAdd(
    title: String!
    image: Upload
  ): ID
}

But when I run the app, it fails with:

Error: Unknown type "Upload". Did you mean "Float"?

Followed from above post, apollo-server automatically put the Upload scalar, but why gives me this error?

Also trying to put Upload scalar also not working:

scalar Upload

...

It gives me:

Error: There can be only one type named "Upload".

What am I missing?

Versions:

Most helpful comment

Hey, that was a mistake on our part. In fact, the Upload type is only added if you do not pass a schema explicitly. The post was updated but you might not have seen that. In any case, thanks for reporting this!

All 4 comments

I'm currently renamed to something like "scalar FileUpload" or something and it seems working now, but you guys should be fix this issue.

Hey, that was a mistake on our part. In fact, the Upload type is only added if you do not pass a schema explicitly. The post was updated but you might not have seen that. In any case, thanks for reporting this!

@JacksonKearl Thanks for reply. Could you give me url address of that post?

It鈥檚 the one you linked in the original issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danilobuerger picture danilobuerger  路  3Comments

veeramarni picture veeramarni  路  3Comments

dupski picture dupski  路  3Comments

attdona picture attdona  路  3Comments

dbrrt picture dbrrt  路  3Comments