Merge more backend docs

This commit is contained in:
Robert Schäfer 2019-04-15 00:57:35 +02:00
parent 6796469c9c
commit 6714cebad8
7 changed files with 13 additions and 45 deletions

View File

@ -4,12 +4,8 @@
* [Edit this Documentation](edit-this-documentation.md) * [Edit this Documentation](edit-this-documentation.md)
* [Installation](installation.md) * [Installation](installation.md)
* [Backend](backend/README.md) * [Backend](backend/README.md)
* [graphql-with-apollo](backend/graphql-with-apollo/README.md) * [GraphQL](backend/graphql.md)
* [GraphQL with Apollo](backend/graphql-with-apollo/graphql-with-apollo/README.md) * [Legacy Migration](backend/db-migration-worker/README.md)
* [Mocking](backend/graphql-with-apollo/graphql-with-apollo/mocking.md)
* [Seeding](backend/graphql-with-apollo/graphql-with-apollo/seeding.md)
* [Import](backend/data-import.md)
* [Middleware](backend/middleware.md)
* [Webapp](webapp/README.md) * [Webapp](webapp/README.md)
* [COMPONENTS](webapp/components.md) * [COMPONENTS](webapp/components.md)
* [PLUGINS](webapp/plugins.md) * [PLUGINS](webapp/plugins.md)

View File

@ -1,7 +1,9 @@
# Import # Legacy Migration
This guide helps you to import data from our legacy servers, which are using FeathersJS and MongoDB. This guide helps you to import data from our legacy servers, which are using FeathersJS and MongoDB.
**You can skip this if you don't plan to migrate any legacy applications!**
## Prerequisites ## Prerequisites
You need [docker](https://www.docker.com/) installed on your machine. Furthermore you need SSH access to the server and you need to know the following login credentials and server settings: You need [docker](https://www.docker.com/) installed on your machine. Furthermore you need SSH access to the server and you need to know the following login credentials and server settings:

View File

@ -1,2 +0,0 @@
# graphql-with-apollo

View File

@ -1,6 +0,0 @@
# GraphQL with Apollo
GraphQL is a data query language which provides an alternative to REST and ad-hoc web service architectures. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server.
![GraphQL Playground](../../../.gitbook/assets/graphql-playground%20%281%29.png)

View File

@ -1,8 +0,0 @@
# Mocking
## Mocking API Results
Alternatively you can just mock all responses from the api which let you build a frontend application without running a neo4j instance.
Just set `MOCK=true` inside `.env` or pass it on application start.

View File

@ -1,20 +0,0 @@
# Seeding
## Seeding The Database
Optionally you can seed the GraphQL service by executing mutations that will write sample data to the database:
{% tabs %}
{% tab title="Yarn" %}
```bash
yarn db:seed
```
{% endtab %}
{% tab title="NPM" %}
```bash
npm run db:seed
```
{% endtab %}
{% endtabs %}

View File

@ -1,8 +1,13 @@
# Middleware # GraphQL with Apollo
GraphQL is a data query language which provides an alternative to REST and ad-hoc web service architectures. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server.
![GraphQL Playground](../../../.gitbook/assets/graphql-playground%20%281%29.png)
## Middleware keeps resolvers clean
![](../.gitbook/assets/grafik-4.png) ![](../.gitbook/assets/grafik-4.png)
## Middleware keeps resolvers clean
A well-organized codebase is key for the ability to maintain and easily introduce changes into an app. Figuring out the right structure for your code remains a continuous challenge - especially as an application grows and more developers are joining a project. A well-organized codebase is key for the ability to maintain and easily introduce changes into an app. Figuring out the right structure for your code remains a continuous challenge - especially as an application grows and more developers are joining a project.
@ -10,3 +15,4 @@ A common problem in GraphQL servers is that resolvers often get cluttered with b
GraphQL Middleware uses the [_middleware pattern_](https://dzone.com/articles/understanding-middleware-pattern-in-expressjs) \(well-known from Express.js\) to pull out repetitive code from resolvers and execute it before or after one of your resolvers is invoked. This improves code modularity and keeps your resolvers clean and simple. GraphQL Middleware uses the [_middleware pattern_](https://dzone.com/articles/understanding-middleware-pattern-in-expressjs) \(well-known from Express.js\) to pull out repetitive code from resolvers and execute it before or after one of your resolvers is invoked. This improves code modularity and keeps your resolvers clean and simple.