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

refactor(config): add defaults #71

Merged

Conversation

JaydeeSale
Copy link
Contributor

  • Adding default config for merging of plugins.ts config correctly as per strapi documentation on custom plugins
  • Fix for uid failing when using custom controllers in strapi, that dont have content types defined

Check for UID on api service, if using custom controllers this will be null, and cause the library to be unusable for anything under than standard content types.
Adding in the default config, so that strapi can merge the transformer config correctly with out the default keys the values dont get merged in and the plugin doesn't register the middleware.

as per https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.html#graphql-configuration

config -> Optional	Used to override default plugin configuration (defined in strapi-server.js)
When a custom controller is implemented, content types are not set.
@JaydeeSale
Copy link
Contributor Author

@ComfortablyCoding can we get this in, so it works in the latest strapi versions

@ComfortablyCoding
Copy link
Contributor

I'll have a look at it over the weekend.

@ComfortablyCoding
Copy link
Contributor

Looks GTM!, I will add a fix for the custom controllers in a seperate PR to keep scope on a single fix/feat etc

@ComfortablyCoding ComfortablyCoding merged commit f543112 into strapi-community:master Feb 26, 2023
@ComfortablyCoding ComfortablyCoding changed the title Default Config, Fix for custom controllers refactor(config): add defaults Feb 26, 2023
@ComfortablyCoding ComfortablyCoding linked an issue Feb 26, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config not being set correctly
2 participants