Skip to content

Commit 5d8cde1

Browse files
authored
Merge pull request #144 from oslabs-beta/dev
Beta release Jun 27 2019
2 parents ebee370 + 94586f3 commit 5d8cde1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3737
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

.eslintrc.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": "eslint:recommended",
7+
"globals": {
8+
"Atomics": "readonly",
9+
"SharedArrayBuffer": "readonly"
10+
},
11+
"parserOptions": {
12+
"ecmaFeatures": {
13+
"jsx": true
14+
},
15+
"ecmaVersion": 2018,
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"react"
20+
],
21+
"rules": {
22+
}
23+
};

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
package-lock.json
3+
Release.key
4+
winehq.key
5+
.env
6+
out
7+
public/bundle.js
8+
public/bundle.js.map
9+
.DS_Store

README.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,65 @@
1-
# protographql
1+
<p align="center" ><img src="public/assets/pictures/ProtographQLBanner.png" width="650px"></p>
2+
3+
# ProtoGraphQL
4+
5+
ProtoGraphQL is a **prototyping tool** that helps developers build and visualize GraphQL schemas and queries without writing any code. Users simply input their relational database tables and ProtoGraphQL will dynamically create a customized and functional GraphQL Apollo Server readily available for export.
6+
7+
ProtoGraphQL is currently in beta. We would appreciate if you could post any issues to our GitHub – we are actively looking for areas for improvement and we welcome feedback from the community.
8+
9+
Upcoming releases include adding visual indicators for table relationships in the “Schema” view, enabling users to create customizable GraphQL mutations, and extending support for NoSQL databases such as MongoDB.
10+
11+
\* *We recently added support for users to view the structures and relationships of their tables using our GraphQL schema tree visualizer!*
12+
13+
## Getting Started:
14+
15+
### Mac / Linux
16+
17+
1. Download [zip](INSERTURLHERE)
18+
19+
2. Extract file
20+
21+
3. Run app
22+
23+
## How to Use:
24+
25+
1. When the application loads, click on **Add Table** and populate the table form with a name and new fields. Optionally, you may also use the last three inputs in the form to create relationships to other tables. When you are done, click **Save**.
26+
27+
2. Navigate to the **Schema**, **Code**, and **Visualize** tabs to toggle views:
28+
* **Schema** - view, edit, or delete tables you've added
29+
* **Code** - view generated GraphQL and SQL code before export
30+
* **Visualize** - view the GraphQL schema intuitively as a simple tree
31+
32+
3. Export the code by clicking the **Export** icon.
33+
34+
4. Enter your Postgres database URI and then select the directory you want to save your executable GraphQL server.
35+
36+
## How to Run GraphQL Server:
37+
38+
There are several libraries we could have used to create a GraphQL server, but we decided to use Apollo Server – the most popular library to setup an endpoint for responding to incoming GraphQL requests in JavaScript.
39+
40+
1. Extract apollo-server.zip file
41+
42+
2. Open the project
43+
44+
3. Install dependencies
45+
```
46+
npm install
47+
```
48+
49+
4. Run the server
50+
```
51+
npm start
52+
```
53+
54+
5. Use Apollo Server Playground to mock client GraphQL queries and responses to your server. [Learn more about constructing GraphQL Queries here](https://graphql.org/learn/queries/)
55+
56+
## Contributors:
57+
58+
<img align="right" src="public/assets/pictures/icon/icon.png" width="125px">
59+
60+
- Alena Budzko [@AlenaBudzko](https://github.com/AlenaBudzko)
61+
- Bryan Fong [@bryanfong-dev](https://github.com/bryanfong-dev)
62+
- Rodolfo Guzman [@Rodolfoguzman25](https://github.com/Rodolfoguzman25)
63+
- Jarred Jack Harewood [@jackhajb](https://github.com/jackhajb)
64+
- Geoffrey Lin [@geofflin](https://github.com/geofflin)
65+

apollo-server/.env

Whitespace-only changes.

apollo-server/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
package-lock.json
3+
.DS_Store
4+
.env

apollo-server/db/sqlPool.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const { Pool } = require('pg');
2+
require("dotenv").config();
3+
4+
const URI = process.env.DB_URI
5+
6+
7+
const pool = new Pool({
8+
connectionString: URI,
9+
ssl: true,
10+
})
11+
12+
pool.connect((err, client, done) => {
13+
if (err) return console.log(`Error connecting to db, ${err}`);
14+
console.log('Connected to db 😄')
15+
done();
16+
})
17+
18+
module.exports = pool;

apollo-server/graphql/resolvers.js

Whitespace-only changes.

apollo-server/graphql/schema.js

Whitespace-only changes.

apollo-server/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "apolloGql",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "nodemon server.js --open"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"dependencies": {
14+
"apollo-server-express": "^2.6.2",
15+
"dotenv": "^8.0.0",
16+
"express": "^4.17.1",
17+
"graphql": "^14.3.1",
18+
"pg": "^7.11.0"
19+
},
20+
"devDependencies": {
21+
"nodemon": "^1.19.1"
22+
}
23+
}

0 commit comments

Comments
 (0)