Files
directus/tests/setup/seeds/02_directus_relations.js
Azri Kahar ad46bfef51 Fix graphql schema for m2o fields without permissions to related collection (#13015)
* fix graphql schema for m2o fields

* add e2e tests for graphql m2o & o2m

* remove unused code

* fix mariadb json error

* attempt to fix oracle

* possibly fix graphql m2o queries
2022-05-03 12:51:12 -04:00

25 lines
565 B
JavaScript

exports.seed = async function (knex) {
await knex('directus_relations').del();
return await knex('directus_relations').insert([
{
many_collection: 'guests',
many_field: 'favorite_artist',
one_collection: 'artists',
},
{
many_collection: 'artists_events',
many_field: 'events_id',
one_collection: 'events',
one_field: 'artists',
junction_field: 'artists_id',
},
{
many_collection: 'artists_events',
many_field: 'artists_id',
one_collection: 'artists',
one_field: 'events',
junction_field: 'events_id',
},
]);
};