An open API service indexing awesome lists of open source software.

https://github.com/charles-dr/graphql-query-builder

#node.js#mongodb#apollo-graphql#react.js#query builder#customized query
https://github.com/charles-dr/graphql-query-builder

Last synced: about 2 months ago
JSON representation

#node.js#mongodb#apollo-graphql#react.js#query builder#customized query

Awesome Lists containing this project

README

        

# Query Builder

## Tech stacks & structure
### Node.js
builds GraphQL server and uses mock data for data sources.

- Structure

All sources files are located in 'src' folder.

index.js - start file

schema.js - stores schema information

resolver.js - resolver file

models - directory to mimic the database with two js files. So edit two files

in this directory to manipulate the data (users and organizations).

### React.js
client app to consume GraphQL queries using query builder

App has been created using create-react-app.
- utils directory

has two files - ApolloClient.js and func.js

AplloClient.js file enables the app to communicate with apollo server. Imported into App.js

func.js file contains the main query builder function.

### GraphQL
GraphQL server and client have been built using Apollo-graphQL.

Check the details here[https://www.apollographql.com/docs/]

## Run the application

### Install packages

in 'server' directory, run
```
yarn
```

in 'client' directory, run
```
yarn
```

### Run server and react app

in 'server' directory, run
```
yarn start
```
Then server runs on localhost:4000.

in 'client' directory, run
```
yarn start
```

App runs on localhost:3000