Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: graphql fields not required during creation when model attribute has a default value #6075

Merged
merged 3 commits into from Jul 16, 2020
Merged

fix: graphql fields not required during creation when model attribute has a default value #6075

merged 3 commits into from Jul 16, 2020

Conversation

gp27
Copy link
Contributor

@gp27 gp27 commented May 5, 2020

Description of what you did:

Changed the graphql type builder behaviour for required attributes:
a required attribute that has a default value now is not required in the input schema used for entities creation

a required attribute that has a default value it's now not required in the input schema used for entities creation

Signed-off-by: Gadi Piperno Corcos <gadi@skyriseltd.com>
@codecov
Copy link

codecov bot commented May 5, 2020

Codecov Report

Merging #6075 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6075   +/-   ##
=======================================
  Coverage   19.85%   19.85%           
=======================================
  Files         856      856           
  Lines       12046    12046           
  Branches     1950     1950           
=======================================
  Hits         2392     2392           
  Misses       8079     8079           
  Partials     1575     1575           
Flag Coverage Δ
#front 14.64% <0.00%> (ø)
#unit 41.34% <ø> (ø)
Impacted Files Coverage Δ
...min/admin/src/components/LeftMenuFooter/Wrapper.js 60.00% <0.00%> (ø)
...rapi-admin/admin/src/components/PageTitle/index.js 66.66% <ø> (ø)

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 2b22675...89043c6. Read the comment docs.

@gp27 gp27 marked this pull request as ready for review May 5, 2020 19:38
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 your contribution !

@alexandrebodin alexandrebodin added this to the 3.0.6 milestone Jul 16, 2020
@alexandrebodin alexandrebodin added source: plugin:graphql Source is plugin/graphql package issue: bug Issue reporting a bug labels Jul 16, 2020
@alexandrebodin alexandrebodin merged commit eb272e9 into strapi:master Jul 16, 2020
gilfernandes pushed a commit to onepointconsulting/strapi that referenced this pull request Aug 13, 2020
a required attribute that has a default value it's now not required in the input schema used for entities creation

Signed-off-by: Gadi Piperno Corcos <gadi@skyriseltd.com>

Co-authored-by: Gadi Piperno Corcos <gadi@skyriseltd.com>
Signed-off-by: Gil Fernandes <gil.fernandes@onepointltd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug source: plugin:graphql Source is plugin/graphql package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants