reflow-project / weloop

WeLoop is a React/TypeScript client for ZenPub and a key component of ReflowOS
https://weloop.reflowproject.eu
GNU Affero General Public License v3.0
5 stars 5 forks source link

Economic resource Image is not uploaded from file picker component. Only as url. #79

Open oksanasalohubova opened 3 years ago

oksanasalohubova commented 3 years ago

To update the economic resource, we get this mutation. But the image type is only a URI. When I try to send a file, nothing happens.

mutation updateEconomicResource (
    $id: ID!,
    $note: String,
    $image: URI,
) {
    updateEconomicResource (
        resource: {
            id: $id,
            note: $note,
            image: $image,
        }
    ) {
        economicResource {
           id
        }
    }
}

For example , when we change user profile, we use this mutation:

mutation meUpdateMyProfile($profile:UpdateProfileInput!, $icon: UploadInput, $image: UploadInput) {
  updateProfile(profile:$profile, icon: $icon, image: $image){
    user {
      id
      name
      icon{ id, url },
      image{ id, url },
      location,
      summary,
      displayUsername,
      website,
      extraInfo
    }
  }
}

And this type of Image variable allows us to load the binary

Could you please fix this?

viktorsmari commented 3 years ago

Thanks @oksanasalohubova, we copy this issue to the API https://github.com/dyne/zenpub/issues/54