Skip to content

Conversation

@darron1217
Copy link
Contributor

Rebased version of #8494

What does it do?

Accept info fields when uploading file through GraphQL

Why is it needed?

To send http request lesser.

Related issue(s)/PR(s)

closes #8493

@codecov
Copy link

codecov bot commented Jan 21, 2021

Codecov Report

Merging #9172 (4ce87fd) into master (5d8f5fb) will decrease coverage by 8.59%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9172      +/-   ##
==========================================
- Coverage   34.64%   26.04%   -8.60%     
==========================================
  Files        1308     1175     -133     
  Lines       14431    10127    -4304     
  Branches     1432      561     -871     
==========================================
- Hits         5000     2638    -2362     
+ Misses       8517     6991    -1526     
+ Partials      914      498     -416     
Flag Coverage Δ
front 26.04% <ø> (ø)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-plugin-content-type-builder/services/constants.js
packages/strapi-utils/lib/object-formatting.js
...ntent-type-builder/controllers/validation/types.js
...tent-type-builder/services/schema-builder/index.js
packages/strapi-utils/lib/webhook.js
packages/strapi-plugin-upload/services/Upload.js
packages/strapi-generate/lib/target.js
packages/strapi-utils/lib/validators.js
packages/strapi-admin/controllers/permission.js
packages/strapi-admin/controllers/admin.js
... and 123 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a48f9f3...548bd0f. Read the comment docs.

@alexandrebodin alexandrebodin added source: plugin:graphql Source is plugin/graphql package issue: enhancement Issue suggesting an enhancement to an existing feature labels Jan 21, 2021
@alexandrebodin alexandrebodin added this to the 3.4.5 milestone Jan 21, 2021
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank you for contributing 🎉

@alexandrebodin
Copy link
Member

Will do some testing debore merging :)

@darron1217
Copy link
Contributor Author

@alexandrebodin Sure, please check it :)

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small fix to avoid an issue with null value

size: buffer.length,
},
{},
extraInfo,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case we send a null value it will fail make sure to default to en empty object here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then how about extraInfo || {}?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly :)

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job thanks for the dedication :D

@alexandrebodin alexandrebodin merged commit 09e0be0 into strapi:master Jan 21, 2021
@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/new-release-strapi-v3-4-5/2446/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: enhancement Issue suggesting an enhancement to an existing feature source: plugin:graphql Source is plugin/graphql package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept info parameters when uploading file through GraphQL

3 participants