Josh a8498df926
feat(cm): reimplement relations for draft & publish (#19642)
* feat(content-manager): Rework findAvailable and findExisting (#19597)

* feat(content-manager): wip rework findAvailable and findExisting

* chore(strapi): simplify relations controller

* feat(content-manager): entity Id based find available

* feat(content-manager): entity Id based find existing

* fix(content-manager): build issues

* chore(content-manager): cleanup

* fix(content-manager): relations controllers unit tests

* fix(content-manager): improve error handling

* fix(content-manager): simplify findExisting relations logic

* fix(content-manager): clean up types

* fix(content-manager): extend available relation API tests

* fix(content-manager): pr feedback

* feat(content-manager): cover find existing test cases

* feat(content-manager): test that we can only find available relations in the same locale

* fix: wip fix unit tests

* chore(content-manager): pr feedback

* fix(content-manager): use db layer to find relations

fix(content-manager): failing relations tests

* fix(content-manager): find relations test

* fix(content-manager): build issues

* fix(content-manager): return latest status of relations in findAvailable (#19681)

* fix(content-manager): return latest status of relations in findAvailable

* fix(content-manager): share logic for findAvailable and findExisting

* fix(admin): relation tests

* fix(content-manager): clean up types

* fix(content-manager): support status for find exisiting

* fix(content-manager): add status and locale filters to subQuery

* fix(content-manager): ts front and skip relations unit tests

* fix(content-manager): request specific status or get latest using document-metadata

* chore(content-manager): use interface

* fix(content-manager): tidy up target relation subquery

* fix(content-manager): tidy up and skip TS for build issues

* fix(content-manager): return status when requested

* chore(content-manager): dont re type entity service response

* fix(content-manager): use document metadata getManyAvailableStatus

* chore(content-manager): remove mapAsync

* feat: implement relations in the cm (#19702)

* Fix: Relating i18n and non-i18n content types (#19731)

* chore: re-enable e2e relation tests

* fix: return undefined

---------

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>
Co-authored-by: Marc-Roig <marc12info@gmail.com>
2024-03-13 10:25:47 +00:00
..
2022-02-10 11:14:11 +01:00
2021-06-24 09:09:29 +02:00

getstarted

This is an example app you can run to test your changes quickly.

Requirements

  • Docker
  • Docker compose
  • Node

Installation

By default once you have setup the monorepo you will be able to run the getstarted app with a sqlite DB directly.

If you wish to run the getstarted app with another database you can use the docker-compose.dev.yml file at the root of the directory.

start the databases

Run the following command at the root of the monorepo

docker-compose -f docker-compose.dev.yml up -d

If you need to stop the running databases you can stop them with the following command:

docker-compose -f docker-compose.dev.yml stop

run the getstarted app with a specific database

DB={dbName} yarn develop

The way it works is that the getstarted app has a specific database.js config file that will use the DB environment variable to setup the right database connection. You can look at the code here

Warning

You might have some errors while connecting to the databases. They might be coming from a conflict between a locally running database instance and the docker instance. To avoid the errors either shutdown your local database instance or change the ports in the ./config/database.js and the docker-compose.dev.yml file.