This Repo show some cases of using Strapi - Open source Node.js Headless CMS 🚀, I do always confused by offcial docs, as a newer to strapi I record some running example to study.
If you want flatten graphql result of v4, visit graphql modified docs
Run these cases local:
git clone https://github.com/GavinXue/strapi-study-cases.git
yarn # or npm install
yarn develop # or npm run develop
Run thest cases online: warn:
It seems this does not work on stackblitz, beause of some unsupported shell syntax(JSH). check some problem Strapi on Stackblitz
I have tried that it is worked on replit. and the file .replit
and replit.nix
are the config file for replit.(import github repo to replit, then click run, and wait) replit repo work link
Due to I have update the sqllite db to github. When run these cases the test strapi, you can directly login with:
name:
[email protected]
password:
: Strapi2022
apiToken:
the description of test token is the actual token (use it directly.) or you can creat a new one.
reference: strapi docs
when token expired, you can issue a new token. and when you want customize other plugin's interface, it should be the same logic.
case code: /src/extensions/users-permissions/strapi-server.js
reference: strapi docs
should be modify the entry file: ./src/index.js
if customizing more types or apis, taking these code to a new module may be better.
case code: ./src/extensions/graphql
reference: Backend customization - Controllers - Strapi Developer Docs
This comes from a question in Auto populate title field with content from other fields - Questions and Answers - Strapi Community Forum .
solve it to extend entity update and create controller. case code: ./src/api/house/controllers/house.js
This comes from How to set Limit of a relation - Discussions - Strapi Community Forum It still a extend core controller problem.
case code: ./src/api/article/controllers/article.js