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

Controllers can't return falsy values for GraphQL queries and mutations #10125

Closed
gfpacheco opened this issue Apr 23, 2021 · 3 comments · Fixed by #10145
Closed

Controllers can't return falsy values for GraphQL queries and mutations #10125

gfpacheco opened this issue Apr 23, 2021 · 3 comments · Fixed by #10145
Labels
severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: plugin:graphql Source is plugin/graphql package status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@gfpacheco
Copy link
Contributor

Bug report

As I'm writing a custom controller action I cannot return falsy values because resolvers-builder.js returns undefined instead.

Describe the bug

https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-graphql/services/resolvers-builder.js#L51 and https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-graphql/services/resolvers-builder.js#L117 ignore valid falsy values (false, '', 0) assigned to ctx.body and return values instead.

Steps to reproduce the behavior

  1. Create a custom action in any controller and set the response to 0
  2. Create a route so you can call it
  3. Write the GraphQL schema and resolver
  4. Call REST endpoint and get expected result
  5. Call GraphQL query and see error

Expected behavior

GraphQL query should return the same result as REST entpoint.

Code snippets

my-controller.js:

module.exports = {
  action: async (ctx, next) => {
    ctx.body = 0;
  },
};

routes.json

{
  "routes": [
    {
      "method": "GET",
      "path": "/my-controller/action",
      "handler": "my-controller.action",
      "config": {
        "policies": []
      }
    }
  ]
}

schema.graphql.js

module.exports = {
  query: `
    action: Int!
  `,
  resolver: {
    Query: {
      action: {
        description: 'Return zero',
        resolver: 'application::my-controller.my-controller.action',
      },
    },
  },
};

System

  • Node.js version: v14.15.0
  • NPM version: 7.6.0
  • Yarn version: v1.22.10
  • Strapi version: 3.5.4
  • Database: sqlite
  • Operating system: MacOS

Additional context

This can be easily solved by checking ctx.body === undefined and I can make the PR if you feel like this is ok.

@kasonde kasonde added the status: pending reproduction Waiting for free time to reproduce the issue, or more information label Apr 26, 2021
@kasonde
Copy link
Contributor

kasonde commented Apr 26, 2021

Hi @gfpacheco the Strapi GraphQL plugin uses apollo-server-koa under the hood which requires that resolver responses are "returned" from a resolver as opposed to fetched from the request context. You can see this in action in our Customize the GraphQL Schema example where restaurant records are returned in this manner for the custom GraphQL query:

restaurantsByCategories: {
  description: 'Return the restaurants open by the category',
  resolverOf: 'application::restaurant.restaurant.findByCategories', // Will apply the same policy on the custom resolver as the controller's action `findByCategories`.
  resolver: async (obj, options, ctx) => {
    // ctx is the context of the Koa request.
    await strapi.controllers.restaurants.findByCategories(ctx);

    return ctx.body.restaurants || `There is no restaurant.`;
  },
},

The response that is returned is taken from ctx.body.

@kasonde kasonde closed this as completed Apr 26, 2021
@kasonde kasonde removed the status: pending reproduction Waiting for free time to reproduce the issue, or more information label Apr 26, 2021
@gfpacheco
Copy link
Contributor Author

gfpacheco commented Apr 26, 2021

@kasonde I'm not sure if you read my issue properly or you don't know how Strapi works.

When you're creating a GraphQL query, instead of writing the resolver function in the schema file, you can just tell Strapi which controller action to call, in my case application::my-controller.my-controller.action.

And when you do that, Strapi creates a wrapper function that serves as your resolver function, this function reads the value returned by the controller from ctx.body and returns it to apollo-server-koa.

The problem is that this wrapper function ignores falsy values and returns undefined here and here.

gfpacheco added a commit to gfpacheco/strapi that referenced this issue Apr 26, 2021
@kasonde kasonde added severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve status: confirmed Confirmed by a Strapi Team member or multiple community members source: plugin:graphql Source is plugin/graphql package labels Apr 26, 2021
@kasonde kasonde reopened this Apr 26, 2021
@kasonde
Copy link
Contributor

kasonde commented Apr 26, 2021

Hi @gfpacheco you're right. I've gone ahead and reopened the issue as well. Thanks again for your clarification.

alexandrebodin pushed a commit that referenced this issue Apr 26, 2021
…ueries and mutations (#10145)

* Fix #10125 - accept falsy values returned by controllers

* Add test for falsy ctx.body on built graphql resolver

* Use test instead of it in unit tests
chris-schra added a commit to meetever/strapi that referenced this issue Apr 30, 2021
* add migration when i18n is disabled on a CT

* use dropTableIfExists

* Fix redirection issue when deleting an entry

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix create slug bug

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix redirection link

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix Pr feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix tabs border radius

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Use similar dropdown indicator as in the CM

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix dropdown indicator

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix PR feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Change tooltip in helper component

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Upgrade Buffet.js

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix version number hover css

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Change settings confirm modal type & change copy locale submit button label

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Update plugin name

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix loading information on error when adding a locale that already exists (strapi#9875)

* Show all locales in the listview content-available cell (strapi#9877)

* Remove permissions with invalid properties on startup

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* fix missing published_at in getNonLocalizedFields Route

* Display error message on the frontend (on permission save validation error)

* fix error wording when join table name is too long (strapi#9880)

* Bump aws-sdk from 2.863.0 to 2.875.0 (strapi#9874)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.863.0 to 2.875.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.863.0...v2.875.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Change plugin i18n logo

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Move findPermissionsIdToRemove logic to a dedicated function

* [I18N] fix typo

* Fix margin in table checkbox (strapi#9883)

* [I18N] fix padding in locale dropdown (strapi#9884)

* Add border-radius to the list of locales in settings (strapi#9885)

* Add spacing at the bottom of the user profile page (strapi#9886)

* [I18N] fix typo (strapi#9887)

* Display locale code instead of name when name is not defined (strapi#9888)

* Fix bullet position in delete content for a locale modal (strapi#9889)

* Fix margin for cog in ListView dropdown (strapi#9890)

* Add search params to publish action

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Add padding

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix media label css

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix border radius in RBAC Editview

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix margin on cog (again) (strapi#9905)

* Fix centering issue on delete locale modale (strapi#9904)

* Change Profile page dom

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Regenerate menu after changing the default locale

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Update permissions after creating a modal

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix empty locale picker on listview (strapi#9906)

* Fix tests

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix PR feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix hover state strapi link

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Only displayed allowed with rbac locales

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bumping buffet and fixing list radius (strapi#9911)

* Fix Pr feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix localizations display

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Only display not used locales

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Rename hook

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump @babel/preset-env from 7.13.8 to 7.13.12 (strapi#9903)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.8 to 7.13.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.12/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-redux from 7.2.2 to 7.2.3 (strapi#9902)

Bumps [react-redux](https://github.com/reduxjs/react-redux) from 7.2.2 to 7.2.3.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](reduxjs/react-redux@v7.2.2...v7.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @testing-library/jest-dom from 5.11.9 to 5.11.10 (strapi#9901)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.11.9 to 5.11.10.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v5.11.9...v5.11.10)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-tooltip from 4.2.15 to 4.2.17 (strapi#9899)

Bumps [react-tooltip](https://github.com/wwayne/react-tooltip) from 4.2.15 to 4.2.17.
- [Release notes](https://github.com/wwayne/react-tooltip/releases)
- [Changelog](https://github.com/wwayne/react-tooltip/blob/master/CHANGELOG.md)
- [Commits](ReactTooltip/react-tooltip@v4.2.15...v4.2.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix ctb menu upate

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fixes strapi#9897

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix css

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix role update when no conditions and redirect the user to hp in listview when response is 403

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix tooltip i18n

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Revert react-redux upgrade (strapi#9930)

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump sharp from 0.27.2 to 0.28.0 (strapi#9927)

Bumps [sharp](https://github.com/lovell/sharp) from 0.27.2 to 0.28.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/master/docs/changelog.md)
- [Commits](lovell/sharp@v0.27.2...v0.28.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix dropdown size for the user (strapi#9931)

* Mock buffet core

* Delete all entries in a locale when locale is deleted

* Fix locale picker

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump aws-sdk from 2.875.0 to 2.878.0 (strapi#9938)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.875.0 to 2.878.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.875.0...v2.878.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump webpack from 4.44.2 to 4.46.0 (strapi#9925)

Bumps [webpack](https://github.com/webpack/webpack) from 4.44.2 to 4.46.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v4.44.2...v4.46.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cyril lopez <cyril.lpz@gmail.com>

* Bump koa-session from 6.1.0 to 6.2.0 (strapi#9936)

Bumps [koa-session](https://github.com/koajs/session) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/koajs/session/releases)
- [Changelog](https://github.com/koajs/session/blob/master/History.md)
- [Commits](koajs/session@6.1.0...6.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update bug report template with LTS version information (strapi#9935)

* handle localized media attr in CM et CTB

* refacto

* fix test

* Remove create permissions for i18n settings

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump mini-css-extract-plugin from 0.6.0 to 1.4.0 (strapi#9924)

Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 0.6.0 to 1.4.0.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/mini-css-extract-plugin@v0.6.0...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix field migration not supposed to run

* Improve CM error management

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Ensure the LV always does not have an empty query

Signed-off-by: soupette <cyril.lpz@gmail.com>

* refacto

* Update content-types.js

* fix unit test

* Bump @babel/preset-react from 7.12.13 to 7.13.13 (strapi#9954)

Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.12.13 to 7.13.13.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.13/packages/babel-preset-react)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump swagger-ui-dist from 3.45.1 to 3.46.0 (strapi#9956)

Bumps [swagger-ui-dist](https://github.com/swagger-api/swagger-ui) from 3.45.1 to 3.46.0.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Commits](swagger-api/swagger-ui@v3.45.1...v3.46.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump snyk from 1.506.0 to 1.522.0 (strapi#9955)

Bumps [snyk](https://github.com/snyk/snyk) from 1.506.0 to 1.522.0.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Changelog](https://github.com/snyk/snyk/blob/master/.releaserc)
- [Commits](snyk/cli@v1.506.0...v1.522.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump aws-sdk from 2.878.0 to 2.879.0 (strapi#9953)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.878.0 to 2.879.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.878.0...v2.879.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove some of the unnecessary distinct  (strapi#9538)

* Only add distinct if it's a join

* made both if the same

* moved repeated if to variable

* forgot an import

* too quick doing this between meetings...

* Renamed boolean constants and changed the the distinct logic, instead of being twice it's only needed to have once

* fixed if

* Fix PR feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Upgrade react-redux

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Ensure unique fields are localized

Signed-off-by: soupette <cyril.lpz@gmail.com>

* UID is always localized in i18n

* Bump aws-sdk from 2.879.0 to 2.880.0 (strapi#9968)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.879.0 to 2.880.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.879.0...v2.880.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @fortawesome/free-brands-svg-icons from 5.15.2 to 5.15.3 (strapi#9964)

Bumps [@fortawesome/free-brands-svg-icons](https://github.com/FortAwesome/Font-Awesome) from 5.15.2 to 5.15.3.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](FortAwesome/Font-Awesome@5.15.2...5.15.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @testing-library/react from 11.2.5 to 11.2.6 (strapi#9967)

Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.2.5 to 11.2.6.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md)
- [Commits](testing-library/react-testing-library@v11.2.5...v11.2.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update content-types.js

* init

* Bump classnames from 2.2.6 to 2.3.1 (strapi#9965)

Bumps [classnames](https://github.com/JedWatson/classnames) from 2.2.6 to 2.3.1.
- [Release notes](https://github.com/JedWatson/classnames/releases)
- [Changelog](https://github.com/JedWatson/classnames/blob/master/HISTORY.md)
- [Commits](https://github.com/JedWatson/classnames/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cloudinary from 1.25.0 to 1.25.1 (strapi#9983)

Bumps [cloudinary](https://github.com/cloudinary/cloudinary_npm) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/cloudinary/cloudinary_npm/releases)
- [Changelog](https://github.com/cloudinary/cloudinary_npm/blob/master/CHANGELOG.md)
- [Commits](cloudinary/cloudinary_npm@1.25.0...1.25.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @fingerprintjs/fingerprintjs from 3.0.6 to 3.0.7 (strapi#9984)

Bumps [@fingerprintjs/fingerprintjs](https://github.com/fingerprintjs/fingerprintjs) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/fingerprintjs/fingerprintjs/releases)
- [Commits](fingerprintjs/fingerprintjs@v3.0.6...v3.0.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codemirror from 5.59.4 to 5.60.0 (strapi#9981)

Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.59.4 to 5.60.0.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](codemirror/codemirror5@5.59.4...5.60.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Uid fields are localised in CM

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix undefined filter value error (strapi#8490) (strapi#9603)

* rename isLocalized to isLocalizedContentType

* Use objects instead of strings to declare queries & mutattions

* Bump semver from 7.3.4 to 7.3.5 (strapi#9989)

Bumps [semver](https://github.com/npm/node-semver) from 7.3.4 to 7.3.5.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.4...v7.3.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump lodash from 4.17.20 to 4.17.21 (strapi#9990)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @sentry/node from 6.2.3 to 6.2.5 (strapi#9993)

Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 6.2.3 to 6.2.5.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.3...6.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 7.18.0 to 7.23.0 (strapi#9991)

Bumps [eslint](https://github.com/eslint/eslint) from 7.18.0 to 7.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.18.0...v7.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Support extra _ root params

* Ellipsis on locale cell only

* Add tests & handle _or & _where

* use globalId for the typeName

* handle compo, dz and media migration when disabling i18n on a field

* Return sections based on role

* all return all actions in ee

* Fix sticky header and select the first locale for copy

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump is-docker from 2.1.1 to 2.2.0 (strapi#10003)

Bumps [is-docker](https://github.com/sindresorhus/is-docker) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/sindresorhus/is-docker/releases)
- [Commits](sindresorhus/is-docker@v2.1.1...v2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix modal confirm border radius

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Fix jumpy app when no edition of a locale

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Remove unnecessary code

* refacto

* Bump formik from 2.2.5 to 2.2.6 (strapi#9992)

Bumps [formik](https://github.com/formium/formik) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/formium/formik/releases)
- [Commits](https://github.com/formium/formik/compare/formik@2.2.5...formik@2.2.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refacto

* Update naming & simplify filter

* Fix bulkDelete on entites that are not in default locale

* refacto

* Bump sharp from 0.28.0 to 0.28.1 (strapi#10013)

Bumps [sharp](https://github.com/lovell/sharp) from 0.28.0 to 0.28.1.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/master/docs/changelog.md)
- [Commits](lovell/sharp@v0.28.0...v0.28.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add test _locale filter on /relations/ route

* use strapi service

* fix singletype put

* fix getNonLocalizedAttributes route for ST

* Bump eslint-plugin-react from 7.22.0 to 7.23.2 (strapi#10038)

Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.22.0 to 7.23.2.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](jsx-eslint/eslint-plugin-react@v7.22.0...v7.23.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/plugin-transform-runtime from 7.13.10 to 7.13.15 (strapi#10016)

Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.13.10 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-plugin-transform-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Pass extra args in ctx.query for every mutation

* Bump @babel/plugin-proposal-async-generator-functions (strapi#10017)

Bumps [@babel/plugin-proposal-async-generator-functions](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-async-generator-functions) from 7.13.8 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-plugin-proposal-async-generator-functions)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Target shadowcrud mutations only

* Bump styled-components from 5.2.1 to 5.2.3

Bumps [styled-components](https://github.com/styled-components/styled-components) from 5.2.1 to 5.2.3.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Changelog](https://github.com/styled-components/styled-components/blob/v5.2.3/CHANGELOG.md)
- [Commits](styled-components/styled-components@v5.2.1...v5.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump react-test-renderer from 17.0.1 to 17.0.2 (strapi#10047)

Bumps [react-test-renderer](https://github.com/facebook/react/tree/HEAD/packages/react-test-renderer) from 17.0.1 to 17.0.2.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.2/packages/react-test-renderer)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump swagger-ui-dist from 3.46.0 to 3.47.1 (strapi#10055)

Bumps [swagger-ui-dist](https://github.com/swagger-api/swagger-ui) from 3.46.0 to 3.47.1.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Commits](swagger-api/swagger-ui@v3.46.0...v3.47.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/preset-env from 7.13.12 to 7.13.15 (strapi#10015)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.12 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade buffet.js to 3.3.5

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump aws-sdk from 2.880.0 to 2.888.0 (strapi#10070)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.880.0 to 2.888.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.880.0...v2.888.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it from 12.0.4 to 12.0.6 (strapi#10066)

Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 12.0.4 to 12.0.6.
- [Release notes](https://github.com/markdown-it/markdown-it/releases)
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it@12.0.4...12.0.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update snapshots

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Make i18n preinstalled (strapi#10071)

* Enable i18n on media field when i18n is activated

Signed-off-by: soupette <cyril.lpz@gmail.com>

* Bump eslint from 7.23.0 to 7.24.0

Bumps [eslint](https://github.com/eslint/eslint) from 7.23.0 to 7.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.23.0...v7.24.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Add an env var to set the init locale code on startup

* Fix typo

* Fix typo in spanish translation (strapi#10060)

* FIx Email Provider Readme. (strapi#9947)

The Shipper Email in the email templates tab may need to be changed for emails to send properly
Settings>Email Templates>Click on a template>Shipper Email

api.us.mailgun.net is not a valid endpoint it should be api.mailgun.net see https://documentation.mailgun.com/en/latest/api-intro.html

* improve english text (strapi#9858)

* Update missing fields (strapi#10022)

* Fixes private field of target relation being reset - strapi#9712 (strapi#9713)

Thank you for this improvement !

* Remove broken & useless typdef (strapi#10085)

* add plugins and providers to send event

* Fix graphql naming to use the same input namine convention as the plugin

* Add i18n telemetry

* Add clean stringify

* Bump is-docker from 2.2.0 to 2.2.1 (strapi#10087)

Bumps [is-docker](https://github.com/sindresorhus/is-docker) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/sindresorhus/is-docker/releases)
- [Commits](sindresorhus/is-docker@v2.2.0...v2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* v3.6.0

* Bump codemirror from 5.60.0 to 5.61.0

Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.60.0 to 5.61.0.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](codemirror/codemirror5@5.60.0...5.61.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump @sentry/node from 6.2.5 to 6.3.0 (strapi#10100)

Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 6.2.5 to 6.3.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.5...6.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump aws-sdk from 2.888.0 to 2.890.0 (strapi#10101)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.888.0 to 2.890.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.888.0...v2.890.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump aws-sdk from 2.890.0 to 2.892.0 (strapi#10136)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.890.0 to 2.892.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.890.0...v2.892.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pg from 8.5.1 to 8.6.0 (strapi#10113)

Bumps [pg](https://github.com/brianc/node-postgres/tree/HEAD/packages/pg) from 8.5.1 to 8.6.0.
- [Release notes](https://github.com/brianc/node-postgres/releases)
- [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianc/node-postgres/commits/pg@8.6.0/packages/pg)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump chalk from 4.1.0 to 4.1.1 (strapi#10112)

Bumps [chalk](https://github.com/chalk/chalk) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](chalk/chalk@v4.1.0...v4.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/runtime from 7.13.10 to 7.13.17 (strapi#10091)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.13.10 to 7.13.17.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.17/packages/babel-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/core from 7.13.15 to 7.13.16 (strapi#10097)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [graphQL + mongo] Fix broken localizations query (strapi#10141)

* fix localizations resolver

* Revert "fix localizations resolver"

This reverts commit 31c92e6.

* fix localizations resolver by adding _id to populate option

* Fix strapi#10125 - Accept falsy values returned by controllers in GraphQL queries and mutations (strapi#10145)

* Fix strapi#10125 - accept falsy values returned by controllers

* Add test for falsy ctx.body on built graphql resolver

* Use test instead of it in unit tests

* Fix issue relation loosing extra options on ctb update Fixes strapi#3409 (strapi#10102)

* Fix typo in query error message (strapi#10116)

The possessive `its` doesn't have an apostrophe.

https://www.dictionary.com/e/its-vs-its/

* Fixed typo (strapi#10132)

* Updated Russian translate (strapi#10133)

* Add DKIM config example (strapi#9923)

* [RBAC] Ignore only non visible attributes instead of non configurable ones (strapi#10139)

* Ignore only non visible attributes instead of non configurable ones

* Update snapshots

* Refacto buildDeepAttributesCollection

* Fix issue with incorrect cli termination when using flags quickstart and no-run (strapi#10111)

On Windows, an empty return from the createQuickStartProject function caused the process termination to hang.
Added explicit process termination for this platform

* Remove cache key so the url is valid for cors policy (strapi#10148)

* Bump apollo-server-koa from 2.22.1 to 2.23.0 (strapi#10155)

Bumps [apollo-server-koa](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-koa) from 2.22.1 to 2.23.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-koa@2.23.0/packages/apollo-server-koa)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump snyk from 1.551.0 to 1.566.0 (strapi#10153)

Bumps [snyk](https://github.com/snyk/snyk) from 1.551.0 to 1.566.0.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Changelog](https://github.com/snyk/snyk/blob/master/.releaserc)
- [Commits](snyk/cli@v1.551.0...v1.566.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ioredis from 4.26.0 to 4.27.1 (strapi#10165)

Bumps [ioredis](https://github.com/luin/ioredis) from 4.26.0 to 4.27.1.
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/luin/ioredis/blob/master/Changelog.md)
- [Commits](redis/ioredis@v4.26.0...v4.27.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @testing-library/jest-dom from 5.11.10 to 5.12.0 (strapi#10166)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.11.10 to 5.12.0.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v5.11.10...v5.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* confirm superAdminRole exists when syncing permissions

* Fix strapi#10172 (strapi#10173)

* Bump react-query from 3.8.3 to 3.13.12 (strapi#10154)

Bumps [react-query](https://github.com/tannerlinsley/react-query) from 3.8.3 to 3.13.12.
- [Release notes](https://github.com/tannerlinsley/react-query/releases)
- [Commits](TanStack/query@v3.8.3...v3.13.12)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update french translation to i18n plugin (strapi#10152)

Fixed a typo and harmonized according to the other plugins.

* v3.6.1

* Bump nodemailer from 6.5.0 to 6.6.0 (strapi#10191)

Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](nodemailer/nodemailer@v6.5.0...v6.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 7.24.0 to 7.25.0 (strapi#10188)

Bumps [eslint](https://github.com/eslint/eslint) from 7.24.0 to 7.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.24.0...v7.25.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-tooltip from 4.2.17 to 4.2.18 (strapi#10192)

Bumps [react-tooltip](https://github.com/wwayne/react-tooltip) from 4.2.17 to 4.2.18.
- [Release notes](https://github.com/wwayne/react-tooltip/releases)
- [Changelog](https://github.com/wwayne/react-tooltip/blob/master/CHANGELOG.md)
- [Commits](ReactTooltip/react-tooltip@v4.2.17...v4.2.18)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-authored-by: Pierre Noël <petersg83@gmail.com>
Co-authored-by: soupette <cyril.lpz@gmail.com>
Co-authored-by: Marvin Frachet <marvin.frachet@strapi.io>
Co-authored-by: Convly <jean-sebastien.herbaux@epitech.eu>
Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DMehaffy <derrickmehaffy@gmail.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: jonmol <46555944+jonmol@users.noreply.github.com>
Co-authored-by: Mattias van den Belt <mattias@taskhero.nl>
Co-authored-by: Josep Camps Miró <campsjos@gmail.com>
Co-authored-by: Cameron <github@strixdesigns.com>
Co-authored-by: innerdvations <ben@innerdvations.com>
Co-authored-by: Yehuda Kremer <yehudakremer@gmail.com>
Co-authored-by: Minjun Kim <public.velopert@gmail.com>
Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
Co-authored-by: Guilherme Pacheco <guilherme.f.pacheco@gmail.com>
Co-authored-by: Tom Dyson <tom@torchbox.com>
Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com>
Co-authored-by: SorinGFS <sorin.gfs@protonmail.com>
Co-authored-by: TheSeally <34841680+TheSeally@users.noreply.github.com>
Co-authored-by: Guillaume Douceron <guillaume.douceron@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: plugin:graphql Source is plugin/graphql package status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
None yet
2 participants