From 378fcce290428b80ac7d64094227da2694799f3b Mon Sep 17 00:00:00 2001
From: Michael Behrisch <m.behrisch@uu.nl>
Date: Fri, 11 Feb 2022 00:18:16 +0100
Subject: [PATCH] test: :sparkles: adds mock-data shared library that should
 hold all data for testing

Provides schema, queryresult, etc. in one place
---
 .vscode/launch.json                           |  16 +
 .../src/components/schema/schema.stories.tsx  |   4 +-
 .../src/components/schema/schema.tsx          |   5 +
 libs/schema/schema-usecases/src/index.ts      |   2 +-
 .../src/lib/mockdata/twitterSchema.json       | 313 ------------------
 .../src/lib/schema-usecases.spec.ts           |  24 +-
 libs/shared/mock-data/.eslintrc.json          |  18 +
 libs/shared/mock-data/README.md               |   7 +
 libs/shared/mock-data/jest.config.js          |  14 +
 libs/shared/mock-data/project.json            |  29 ++
 libs/shared/mock-data/src/index.ts            |   4 +
 .../mock-data/src/schema/moviesSchema.ts}     |   2 +-
 .../mock-data/src/schema/northwindSchema.ts}  |   2 +-
 .../mock-data/src/schema/simple.ts}           |   2 +-
 .../mock-data/src/schema/twitterSchema.ts     | 313 ++++++++++++++++++
 libs/shared/mock-data/tsconfig.json           |  19 ++
 libs/shared/mock-data/tsconfig.lib.json       |  11 +
 libs/shared/mock-data/tsconfig.spec.json      |  19 ++
 tsconfig.base.json                            |   3 +
 workspace.json                                |   1 +
 20 files changed, 476 insertions(+), 332 deletions(-)
 delete mode 100644 libs/schema/schema-usecases/src/lib/mockdata/twitterSchema.json
 create mode 100644 libs/shared/mock-data/.eslintrc.json
 create mode 100644 libs/shared/mock-data/README.md
 create mode 100644 libs/shared/mock-data/jest.config.js
 create mode 100644 libs/shared/mock-data/project.json
 create mode 100644 libs/shared/mock-data/src/index.ts
 rename libs/{schema/schema-usecases/src/lib/mockdata/moviesSchema.json => shared/mock-data/src/schema/moviesSchema.ts} (97%)
 rename libs/{schema/schema-usecases/src/lib/mockdata/northwindSchema.json => shared/mock-data/src/schema/northwindSchema.ts} (99%)
 rename libs/{schema/schema-usecases/src/lib/mockdata/simple.json => shared/mock-data/src/schema/simple.ts} (98%)
 create mode 100644 libs/shared/mock-data/src/schema/twitterSchema.ts
 create mode 100644 libs/shared/mock-data/tsconfig.json
 create mode 100644 libs/shared/mock-data/tsconfig.lib.json
 create mode 100644 libs/shared/mock-data/tsconfig.spec.json

diff --git a/.vscode/launch.json b/.vscode/launch.json
index 663259f3f..f73ba1c65 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -12,6 +12,22 @@
       "console": "integratedTerminal",
       "internalConsoleOptions": "neverOpen",
       "port": 9229
+    },
+    {
+      // Requires the extension Debugger for Chrome: https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome
+      "type": "chrome",
+      "request": "launch",
+      "name": "Storybook Debug",
+      "breakOnLoad": true,
+      "url": "http://localhost:4400/?path=/story/",
+      "sourceMaps": true,
+      "webRoot": "${workspaceFolder}",
+      "sourceMapPathOverrides": {
+        "webpack:///*": "${webRoot}/*",
+        "webpack:///./*": "${webRoot}/*",
+        "webpack:///src/*": "${webRoot}/*",
+        "webpack:///./~/*": "${webRoot}/node_modules/*"
+      }
     }
   ]
 }
diff --git a/apps/web-graphpolaris/src/components/schema/schema.stories.tsx b/apps/web-graphpolaris/src/components/schema/schema.stories.tsx
index 4eb22a1ea..7441b44b9 100644
--- a/apps/web-graphpolaris/src/components/schema/schema.stories.tsx
+++ b/apps/web-graphpolaris/src/components/schema/schema.stories.tsx
@@ -1,5 +1,5 @@
 import {
-  handleSchemaLayout,
+  // handleSchemaLayout,
   parseSchemaFromBackend
 } from '@graphpolaris/schema/schema-usecases';
 import {
@@ -143,5 +143,5 @@ TestWithSchema.play = async () => {
   });
 
   //dispatch(setSchema(schema));
-  handleSchemaLayout(schema);
+  // handleSchemaLayout(schema);
 };
diff --git a/apps/web-graphpolaris/src/components/schema/schema.tsx b/apps/web-graphpolaris/src/components/schema/schema.tsx
index 2114a9722..1023e2e3a 100644
--- a/apps/web-graphpolaris/src/components/schema/schema.tsx
+++ b/apps/web-graphpolaris/src/components/schema/schema.tsx
@@ -24,6 +24,11 @@ const initialElements = [
 
 const Schema = (props: Props) => {
   const dbschema = useSchema();
+  console.log(dbschema);
+
+  const flowElements = createReactFlowElements(dbschema);
+  console.log(flowElements);
+
   // const [dbschema, setSchema] = useState(useSchema());
 
   // const [flowElements, setFlowElements] = useState(initialElements);
diff --git a/libs/schema/schema-usecases/src/index.ts b/libs/schema/schema-usecases/src/index.ts
index 1aa537795..098e236f2 100644
--- a/libs/schema/schema-usecases/src/index.ts
+++ b/libs/schema/schema-usecases/src/index.ts
@@ -1 +1 @@
-export * from './lib/schema-usecases';
+export * from './lib/schema-usecases';
\ No newline at end of file
diff --git a/libs/schema/schema-usecases/src/lib/mockdata/twitterSchema.json b/libs/schema/schema-usecases/src/lib/mockdata/twitterSchema.json
deleted file mode 100644
index 2ec7e5fb9..000000000
--- a/libs/schema/schema-usecases/src/lib/mockdata/twitterSchema.json
+++ /dev/null
@@ -1,313 +0,0 @@
-{
-	"nodes": [
-		{
-			"name": "Me",
-			"attributes": [
-				{
-					"name": "screen_name",
-					"type": "string"
-				},
-				{
-					"name": "name",
-					"type": "string"
-				},
-				{
-					"name": "location",
-					"type": "string"
-				},
-				{
-					"name": "followers",
-					"type": "int"
-				},
-				{
-					"name": "following",
-					"type": "int"
-				},
-				{
-					"name": "url",
-					"type": "string"
-				},
-				{
-					"name": "profile_image_url",
-					"type": "string"
-				}
-			]
-		},
-		{
-			"name": "Link",
-			"attributes": [
-				{
-					"name": "url",
-					"type": "string"
-				}
-			]
-		},
-		{
-			"name": "Source",
-			"attributes": [
-				{
-					"name": "name",
-					"type": "string"
-				}
-			]
-		},
-		{
-			"name": "Hashtag",
-			"attributes": [
-				{
-					"name": "name",
-					"type": "string"
-				}
-			]
-		},
-		{
-			"name": "User",
-			"attributes": [
-				{
-					"name": "screen_name",
-					"type": "string"
-				},
-				{
-					"name": "name",
-					"type": "string"
-				},
-				{
-					"name": "location",
-					"type": "string"
-				},
-				{
-					"name": "followers",
-					"type": "int"
-				},
-				{
-					"name": "following",
-					"type": "int"
-				},
-				{
-					"name": "url",
-					"type": "string"
-				},
-				{
-					"name": "profile_image_url",
-					"type": "string"
-				},
-				{
-					"name": "screen_name",
-					"type": "string"
-				},
-				{
-					"name": "name",
-					"type": "string"
-				},
-				{
-					"name": "location",
-					"type": "string"
-				},
-				{
-					"name": "followers",
-					"type": "int"
-				},
-				{
-					"name": "following",
-					"type": "int"
-				},
-				{
-					"name": "statuses",
-					"type": "int"
-				},
-				{
-					"name": "url",
-					"type": "string"
-				},
-				{
-					"name": "profile_image_url",
-					"type": "string"
-				}
-			]
-		},
-		{
-			"name": "Tweet",
-			"attributes": [
-				{
-					"name": "id",
-					"type": "int"
-				},
-				{
-					"name": "id_str",
-					"type": "string"
-				},
-				{
-					"name": "text",
-					"type": "string"
-				},
-				{
-					"name": "favorites",
-					"type": "int"
-				},
-				{
-					"name": "import_method",
-					"type": "string"
-				}
-			]
-		}
-	],
-	"edges": [
-		{
-			"name": "USING",
-			"collection": "USING",
-			"from": "Tweet",
-			"to": "Source",
-			"attributes": []
-		},
-		{
-			"name": "SIMILAR_TO",
-			"collection": "SIMILAR_TO",
-			"from": "User",
-			"to": "User",
-			"attributes": [
-				{
-					"name": "score",
-					"type": "float"
-				}
-			]
-		},
-		{
-			"name": "SIMILAR_TO",
-			"collection": "SIMILAR_TO",
-			"from": "User",
-			"to": "Me",
-			"attributes": [
-				{
-					"name": "score",
-					"type": "float"
-				}
-			]
-		},
-		{
-			"name": "AMPLIFIES",
-			"collection": "AMPLIFIES",
-			"from": "Me",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "AMPLIFIES",
-			"collection": "AMPLIFIES",
-			"from": "User",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "RT_MENTIONS",
-			"collection": "RT_MENTIONS",
-			"from": "Me",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "RT_MENTIONS",
-			"collection": "RT_MENTIONS",
-			"from": "User",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "FOLLOWS",
-			"collection": "FOLLOWS",
-			"from": "User",
-			"to": "Me",
-			"attributes": []
-		},
-		{
-			"name": "FOLLOWS",
-			"collection": "FOLLOWS",
-			"from": "Me",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "FOLLOWS",
-			"collection": "FOLLOWS",
-			"from": "User",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "FOLLOWS",
-			"collection": "FOLLOWS",
-			"from": "Me",
-			"to": "Me",
-			"attributes": []
-		},
-		{
-			"name": "INTERACTS_WITH",
-			"collection": "INTERACTS_WITH",
-			"from": "User",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "INTERACTS_WITH",
-			"collection": "INTERACTS_WITH",
-			"from": "Me",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "RETWEETS",
-			"collection": "RETWEETS",
-			"from": "Tweet",
-			"to": "Tweet",
-			"attributes": []
-		},
-		{
-			"name": "REPLY_TO",
-			"collection": "REPLY_TO",
-			"from": "Tweet",
-			"to": "Tweet",
-			"attributes": []
-		},
-		{
-			"name": "CONTAINS",
-			"collection": "CONTAINS",
-			"from": "Tweet",
-			"to": "Link",
-			"attributes": []
-		},
-		{
-			"name": "MENTIONS",
-			"collection": "MENTIONS",
-			"from": "Tweet",
-			"to": "User",
-			"attributes": []
-		},
-		{
-			"name": "MENTIONS",
-			"collection": "MENTIONS",
-			"from": "Tweet",
-			"to": "Me",
-			"attributes": []
-		},
-		{
-			"name": "TAGS",
-			"collection": "TAGS",
-			"from": "Tweet",
-			"to": "Hashtag",
-			"attributes": []
-		},
-		{
-			"name": "POSTS",
-			"collection": "POSTS",
-			"from": "User",
-			"to": "Tweet",
-			"attributes": []
-		},
-		{
-			"name": "POSTS",
-			"collection": "POSTS",
-			"from": "Me",
-			"to": "Tweet",
-			"attributes": []
-		}
-	]
-}
\ No newline at end of file
diff --git a/libs/schema/schema-usecases/src/lib/schema-usecases.spec.ts b/libs/schema/schema-usecases/src/lib/schema-usecases.spec.ts
index de75d0433..a466f3101 100644
--- a/libs/schema/schema-usecases/src/lib/schema-usecases.spec.ts
+++ b/libs/schema/schema-usecases/src/lib/schema-usecases.spec.ts
@@ -2,17 +2,19 @@ import { SchemaFromBackend } from '@graphpolaris/shared/data-access/store';
 import { MultiGraph } from 'graphology';
 import { parse } from 'path/posix';
 import { parseSchemaFromBackend } from '..';
-import * as simpleSchema from './mockdata/simple.json';
-import * as moviewSchema from './mockdata/moviesSchema.json';
-import * as northwindSchema from './mockdata/northwindSchema.json';
-import * as twitterSchema from './mockdata/twitterSchema.json';
 import { Attributes } from 'graphology-types';
+import {
+  movieSchema,
+  northWindSchema,
+  simpleSchema,
+  twitterSchema,
+} from 'libs/shared/mock-data/src';
 
 describe('SchemaUsecases', () => {
   test.each([
     { data: simpleSchema },
-    { data: moviewSchema },
-    { data: northwindSchema },
+    { data: movieSchema },
+    { data: northWindSchema },
     { data: twitterSchema },
   ])('parseSchemaFromBackend parsing should work', ({ data }) => {
     // console.log('testinput', input);
@@ -20,7 +22,7 @@ describe('SchemaUsecases', () => {
     const parsed = parseSchemaFromBackend(data as SchemaFromBackend);
     expect(parsed).toBeDefined();
 
-    let parsedNodeAttributes: Attributes[] = []; 
+    let parsedNodeAttributes: Attributes[] = [];
     parsed.forEachNode((node, attr) => {
       // console.log('Node', node, attr);
       parsedNodeAttributes.push(attr.attributes);
@@ -57,13 +59,9 @@ describe('SchemaUsecases', () => {
   });
 
   test.each([
-    //     import * as simpleSchema from './mockdata/simple.json';
-    // import * as moviewSchema from './mockdata/moviesSchema.json';
-    // import * as northwindSchema from './mockdata/northwindSchema.json';
-    // import * as twitterSchema from './mockdata/twitterSchema.json';
     { data: simpleSchema },
-    { data: moviewSchema },
-    { data: northwindSchema },
+    { data: movieSchema },
+    { data: northWindSchema },
     { data: twitterSchema },
   ])('should load my test json $data', ({ data }) => {
     expect(data).toBeDefined();
diff --git a/libs/shared/mock-data/.eslintrc.json b/libs/shared/mock-data/.eslintrc.json
new file mode 100644
index 000000000..3456be9b9
--- /dev/null
+++ b/libs/shared/mock-data/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+  "extends": ["../../../.eslintrc.json"],
+  "ignorePatterns": ["!**/*"],
+  "overrides": [
+    {
+      "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
+      "rules": {}
+    },
+    {
+      "files": ["*.ts", "*.tsx"],
+      "rules": {}
+    },
+    {
+      "files": ["*.js", "*.jsx"],
+      "rules": {}
+    }
+  ]
+}
diff --git a/libs/shared/mock-data/README.md b/libs/shared/mock-data/README.md
new file mode 100644
index 000000000..3e701fff7
--- /dev/null
+++ b/libs/shared/mock-data/README.md
@@ -0,0 +1,7 @@
+# shared-mock-data
+
+This library was generated with [Nx](https://nx.dev).
+
+## Running unit tests
+
+Run `nx test shared-mock-data` to execute the unit tests via [Jest](https://jestjs.io).
diff --git a/libs/shared/mock-data/jest.config.js b/libs/shared/mock-data/jest.config.js
new file mode 100644
index 000000000..4e791eac5
--- /dev/null
+++ b/libs/shared/mock-data/jest.config.js
@@ -0,0 +1,14 @@
+module.exports = {
+  displayName: 'shared-mock-data',
+  preset: '../../../jest.preset.js',
+  globals: {
+    'ts-jest': {
+      tsconfig: '<rootDir>/tsconfig.spec.json',
+    },
+  },
+  transform: {
+    '^.+\\.[tj]s$': 'ts-jest',
+  },
+  moduleFileExtensions: ['ts', 'js', 'html'],
+  coverageDirectory: '../../../coverage/libs/shared/mock-data',
+};
diff --git a/libs/shared/mock-data/project.json b/libs/shared/mock-data/project.json
new file mode 100644
index 000000000..0a0ec6c23
--- /dev/null
+++ b/libs/shared/mock-data/project.json
@@ -0,0 +1,29 @@
+{
+  "root": "libs/shared/mock-data",
+  "sourceRoot": "libs/shared/mock-data/src",
+  "projectType": "library",
+  "targets": {
+    "lint": {
+      "executor": "@nrwl/linter:eslint",
+      "outputs": ["{options.outputFile}"],
+      "options": {
+        "lintFilePatterns": ["libs/shared/mock-data/**/*.ts"]
+      }
+    },
+    "test": {
+      "executor": "@nrwl/jest:jest",
+      "outputs": ["coverage/libs/shared/mock-data"],
+      "options": {
+        "jestConfig": "libs/shared/mock-data/jest.config.js",
+        "passWithNoTests": true
+      }
+    },
+    "version": {
+      "executor": "@jscutlery/semver:version",
+      "options": {
+        "commitMessageFormat": "chore(${projectName}): release version ${version}"
+      }
+    }
+  },
+  "tags": []
+}
diff --git a/libs/shared/mock-data/src/index.ts b/libs/shared/mock-data/src/index.ts
new file mode 100644
index 000000000..56efd8b11
--- /dev/null
+++ b/libs/shared/mock-data/src/index.ts
@@ -0,0 +1,4 @@
+export * from './schema/simple';
+export * from './schema/moviesSchema';
+export * from './schema/northwindSchema';
+export * from './schema/twitterSchema';
diff --git a/libs/schema/schema-usecases/src/lib/mockdata/moviesSchema.json b/libs/shared/mock-data/src/schema/moviesSchema.ts
similarity index 97%
rename from libs/schema/schema-usecases/src/lib/mockdata/moviesSchema.json
rename to libs/shared/mock-data/src/schema/moviesSchema.ts
index 00b4bb2ec..67bdc0129 100644
--- a/libs/schema/schema-usecases/src/lib/mockdata/moviesSchema.json
+++ b/libs/shared/mock-data/src/schema/moviesSchema.ts
@@ -1,4 +1,4 @@
-{
+export const movieSchema = {
 	"nodes": [
 		{
 			"name": "Movie",
diff --git a/libs/schema/schema-usecases/src/lib/mockdata/northwindSchema.json b/libs/shared/mock-data/src/schema/northwindSchema.ts
similarity index 99%
rename from libs/schema/schema-usecases/src/lib/mockdata/northwindSchema.json
rename to libs/shared/mock-data/src/schema/northwindSchema.ts
index d3f92c47d..8cf2e9655 100644
--- a/libs/schema/schema-usecases/src/lib/mockdata/northwindSchema.json
+++ b/libs/shared/mock-data/src/schema/northwindSchema.ts
@@ -1,4 +1,4 @@
-{
+export const northWindSchema = {
 	"nodes": [
 		{
 			"name": "Order",
diff --git a/libs/schema/schema-usecases/src/lib/mockdata/simple.json b/libs/shared/mock-data/src/schema/simple.ts
similarity index 98%
rename from libs/schema/schema-usecases/src/lib/mockdata/simple.json
rename to libs/shared/mock-data/src/schema/simple.ts
index 826dbe483..13c5a91e0 100644
--- a/libs/schema/schema-usecases/src/lib/mockdata/simple.json
+++ b/libs/shared/mock-data/src/schema/simple.ts
@@ -1,4 +1,4 @@
-{
+ export const simpleSchema = {
   "nodes": [
     {
       "name": "Thijs",
diff --git a/libs/shared/mock-data/src/schema/twitterSchema.ts b/libs/shared/mock-data/src/schema/twitterSchema.ts
new file mode 100644
index 000000000..98a73b9ab
--- /dev/null
+++ b/libs/shared/mock-data/src/schema/twitterSchema.ts
@@ -0,0 +1,313 @@
+export const twitterSchema = {
+  nodes: [
+    {
+      name: 'Me',
+      attributes: [
+        {
+          name: 'screen_name',
+          type: 'string',
+        },
+        {
+          name: 'name',
+          type: 'string',
+        },
+        {
+          name: 'location',
+          type: 'string',
+        },
+        {
+          name: 'followers',
+          type: 'int',
+        },
+        {
+          name: 'following',
+          type: 'int',
+        },
+        {
+          name: 'url',
+          type: 'string',
+        },
+        {
+          name: 'profile_image_url',
+          type: 'string',
+        },
+      ],
+    },
+    {
+      name: 'Link',
+      attributes: [
+        {
+          name: 'url',
+          type: 'string',
+        },
+      ],
+    },
+    {
+      name: 'Source',
+      attributes: [
+        {
+          name: 'name',
+          type: 'string',
+        },
+      ],
+    },
+    {
+      name: 'Hashtag',
+      attributes: [
+        {
+          name: 'name',
+          type: 'string',
+        },
+      ],
+    },
+    {
+      name: 'User',
+      attributes: [
+        {
+          name: 'screen_name',
+          type: 'string',
+        },
+        {
+          name: 'name',
+          type: 'string',
+        },
+        {
+          name: 'location',
+          type: 'string',
+        },
+        {
+          name: 'followers',
+          type: 'int',
+        },
+        {
+          name: 'following',
+          type: 'int',
+        },
+        {
+          name: 'url',
+          type: 'string',
+        },
+        {
+          name: 'profile_image_url',
+          type: 'string',
+        },
+        {
+          name: 'screen_name',
+          type: 'string',
+        },
+        {
+          name: 'name',
+          type: 'string',
+        },
+        {
+          name: 'location',
+          type: 'string',
+        },
+        {
+          name: 'followers',
+          type: 'int',
+        },
+        {
+          name: 'following',
+          type: 'int',
+        },
+        {
+          name: 'statuses',
+          type: 'int',
+        },
+        {
+          name: 'url',
+          type: 'string',
+        },
+        {
+          name: 'profile_image_url',
+          type: 'string',
+        },
+      ],
+    },
+    {
+      name: 'Tweet',
+      attributes: [
+        {
+          name: 'id',
+          type: 'int',
+        },
+        {
+          name: 'id_str',
+          type: 'string',
+        },
+        {
+          name: 'text',
+          type: 'string',
+        },
+        {
+          name: 'favorites',
+          type: 'int',
+        },
+        {
+          name: 'import_method',
+          type: 'string',
+        },
+      ],
+    },
+  ],
+  edges: [
+    {
+      name: 'USING',
+      collection: 'USING',
+      from: 'Tweet',
+      to: 'Source',
+      attributes: [],
+    },
+    {
+      name: 'SIMILAR_TO',
+      collection: 'SIMILAR_TO',
+      from: 'User',
+      to: 'User',
+      attributes: [
+        {
+          name: 'score',
+          type: 'float',
+        },
+      ],
+    },
+    {
+      name: 'SIMILAR_TO',
+      collection: 'SIMILAR_TO',
+      from: 'User',
+      to: 'Me',
+      attributes: [
+        {
+          name: 'score',
+          type: 'float',
+        },
+      ],
+    },
+    {
+      name: 'AMPLIFIES',
+      collection: 'AMPLIFIES',
+      from: 'Me',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'AMPLIFIES',
+      collection: 'AMPLIFIES',
+      from: 'User',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'RT_MENTIONS',
+      collection: 'RT_MENTIONS',
+      from: 'Me',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'RT_MENTIONS',
+      collection: 'RT_MENTIONS',
+      from: 'User',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'FOLLOWS',
+      collection: 'FOLLOWS',
+      from: 'User',
+      to: 'Me',
+      attributes: [],
+    },
+    {
+      name: 'FOLLOWS',
+      collection: 'FOLLOWS',
+      from: 'Me',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'FOLLOWS',
+      collection: 'FOLLOWS',
+      from: 'User',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'FOLLOWS',
+      collection: 'FOLLOWS',
+      from: 'Me',
+      to: 'Me',
+      attributes: [],
+    },
+    {
+      name: 'INTERACTS_WITH',
+      collection: 'INTERACTS_WITH',
+      from: 'User',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'INTERACTS_WITH',
+      collection: 'INTERACTS_WITH',
+      from: 'Me',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'RETWEETS',
+      collection: 'RETWEETS',
+      from: 'Tweet',
+      to: 'Tweet',
+      attributes: [],
+    },
+    {
+      name: 'REPLY_TO',
+      collection: 'REPLY_TO',
+      from: 'Tweet',
+      to: 'Tweet',
+      attributes: [],
+    },
+    {
+      name: 'CONTAINS',
+      collection: 'CONTAINS',
+      from: 'Tweet',
+      to: 'Link',
+      attributes: [],
+    },
+    {
+      name: 'MENTIONS',
+      collection: 'MENTIONS',
+      from: 'Tweet',
+      to: 'User',
+      attributes: [],
+    },
+    {
+      name: 'MENTIONS',
+      collection: 'MENTIONS',
+      from: 'Tweet',
+      to: 'Me',
+      attributes: [],
+    },
+    {
+      name: 'TAGS',
+      collection: 'TAGS',
+      from: 'Tweet',
+      to: 'Hashtag',
+      attributes: [],
+    },
+    {
+      name: 'POSTS',
+      collection: 'POSTS',
+      from: 'User',
+      to: 'Tweet',
+      attributes: [],
+    },
+    {
+      name: 'POSTS',
+      collection: 'POSTS',
+      from: 'Me',
+      to: 'Tweet',
+      attributes: [],
+    },
+  ],
+};
diff --git a/libs/shared/mock-data/tsconfig.json b/libs/shared/mock-data/tsconfig.json
new file mode 100644
index 000000000..355f7fda9
--- /dev/null
+++ b/libs/shared/mock-data/tsconfig.json
@@ -0,0 +1,19 @@
+{
+  "extends": "../../../tsconfig.base.json",
+  "files": [],
+  "include": [],
+  "references": [
+    {
+      "path": "./tsconfig.lib.json"
+    },
+    {
+      "path": "./tsconfig.spec.json"
+    }
+  ],
+  "compilerOptions": {
+    "forceConsistentCasingInFileNames": true,
+    "strict": true,
+    "noImplicitReturns": true,
+    "noFallthroughCasesInSwitch": true
+  }
+}
diff --git a/libs/shared/mock-data/tsconfig.lib.json b/libs/shared/mock-data/tsconfig.lib.json
new file mode 100644
index 000000000..6eb3eb9ea
--- /dev/null
+++ b/libs/shared/mock-data/tsconfig.lib.json
@@ -0,0 +1,11 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../../../dist/out-tsc",
+    "declaration": true,
+    "types": [],
+    "composite": true
+  },
+  "include": ["**/*.ts"],
+  "exclude": ["**/*.spec.ts"]
+}
diff --git a/libs/shared/mock-data/tsconfig.spec.json b/libs/shared/mock-data/tsconfig.spec.json
new file mode 100644
index 000000000..d8716fecf
--- /dev/null
+++ b/libs/shared/mock-data/tsconfig.spec.json
@@ -0,0 +1,19 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../../../dist/out-tsc",
+    "module": "commonjs",
+    "types": ["jest", "node"]
+  },
+  "include": [
+    "**/*.test.ts",
+    "**/*.spec.ts",
+    "**/*.test.tsx",
+    "**/*.spec.tsx",
+    "**/*.test.js",
+    "**/*.spec.js",
+    "**/*.test.jsx",
+    "**/*.spec.jsx",
+    "**/*.d.ts"
+  ]
+}
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 4f689f610..3a7abfe4f 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -23,6 +23,9 @@
       ],
       "@graphpolaris/shared/data-access/theme": [
         "libs/shared/data-access/theme/src/index.ts"
+      ],
+      "@graphpolaris/shared/mock-data": [
+        "libs/shared/mock-data/src/index.ts"
       ]
     }
   },
diff --git a/workspace.json b/workspace.json
index 1369ffa1c..ac2b0bad9 100644
--- a/workspace.json
+++ b/workspace.json
@@ -4,6 +4,7 @@
     "schema-schema-usecases": "libs/schema/schema-usecases",
     "shared-data-access-store": "libs/shared/data-access/store",
     "shared-data-access-theme": "libs/shared/data-access/theme",
+    "shared-mock-data": "libs/shared/mock-data",
     "web-graphpolaris": "apps/web-graphpolaris",
     "web-graphpolaris-e2e": "apps/web-graphpolaris-e2e"
   }
-- 
GitLab