mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Merge more backend docs
This commit is contained in:
parent
6796469c9c
commit
6714cebad8
@ -4,12 +4,8 @@
|
||||
* [Edit this Documentation](edit-this-documentation.md)
|
||||
* [Installation](installation.md)
|
||||
* [Backend](backend/README.md)
|
||||
* [graphql-with-apollo](backend/graphql-with-apollo/README.md)
|
||||
* [GraphQL with Apollo](backend/graphql-with-apollo/graphql-with-apollo/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)
|
||||
* [GraphQL](backend/graphql.md)
|
||||
* [Legacy Migration](backend/db-migration-worker/README.md)
|
||||
* [Webapp](webapp/README.md)
|
||||
* [COMPONENTS](webapp/components.md)
|
||||
* [PLUGINS](webapp/plugins.md)
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
# Import
|
||||
# Legacy Migration
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
@ -1,2 +0,0 @@
|
||||
# graphql-with-apollo
|
||||
|
||||
@ -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.
|
||||
|
||||

|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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 %}
|
||||
|
||||
@ -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.
|
||||
|
||||

|
||||
|
||||
## Middleware keeps resolvers clean
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user