
├── .babelrc ├── .bablerc ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── _protographql_tests_ ├── buildENV.test.js ├── buildGQLInputTypes.test.js └── buildGQLSchema.test.js ├── apollo-server ├── .env ├── .gitignore ├── db │ ├── createTables.sql │ └── sqlPool.js ├── graphql │ ├── resolvers.js │ └── schema.js ├── package.json ├── public │ ├── index.html │ ├── logo.png │ └── stylesheet.css ├── server.js └── tests │ └── tests.js ├── index.html ├── main.js ├── package.json ├── palette.css ├── public ├── assets │ └── pictures │ │ ├── Code_Screenshot.png │ │ ├── Export_Screenshot.png │ │ ├── GitHub-Mark-Light-64px.png │ │ ├── GraphQL-Logo.png │ │ ├── GraphQL_Logo.png │ │ ├── ProtoGraphQLLogo.png │ │ ├── ProtoGraphQLLogo64.png │ │ ├── ProtographQLBanner.png │ │ ├── Rest-Logo.png │ │ ├── Schema_Screenshot.png │ │ ├── add-table demo.mov.gif │ │ ├── icon.png │ │ ├── icon │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ │ ├── tree visializer demo.gif │ │ ├── v2-add-tables.gif │ │ ├── v2-codeview.png │ │ ├── v2-export.png │ │ ├── v2-import-tables.gif │ │ ├── v2-schema-view.png │ │ ├── v2-test-queries.gif │ │ └── v2-visualizer.gif ├── index.html └── styles.css ├── src ├── App.jsx ├── actions │ └── actionTypes.jsx ├── components │ ├── header │ │ └── header.jsx │ ├── popup │ │ ├── exportPopUp.jsx │ │ ├── instructions.jsx │ │ ├── tableField.jsx │ │ ├── tableForm.jsx │ │ ├── tableInput.jsx │ │ ├── tableNameInput.jsx │ │ └── welcome.jsx │ ├── sideBar │ │ ├── navButton.jsx │ │ ├── navSidebar.jsx │ │ ├── noTableButton.jsx │ │ ├── visualizerSidebar.jsx │ │ └── vizType.jsx │ └── view │ │ ├── codeView.jsx │ │ ├── mainView.jsx │ │ ├── schemaTable.jsx │ │ ├── schemaView.jsx │ │ ├── testsView.jsx │ │ └── visualizeView.jsx ├── container │ └── mainContainer.jsx ├── index.jsx ├── pg-import │ ├── pgQuery.js │ └── sqlPool.js ├── state │ ├── initialState.jsx │ ├── mockState.jsx │ └── store.jsx └── utils │ ├── buildENV.js │ ├── buildExportTestSuite.js │ ├── buildGQLInputTypes.js │ ├── buildGQLMutationTypes.js │ ├── buildGQLObjTypes.js │ ├── buildGQLQueryType.js │ ├── buildGQLResolvers.js │ ├── buildGQLSchema.js │ ├── buildSQLScripts.js │ ├── buildVisualizerJson.js │ ├── deepClone.js │ └── tabs.js ├── tests └── tests.js ├── tsconfig.json └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ["@babel/preset-env", "@babel/preset-react"] 3 | } 4 | 5 | //hello 6 | -------------------------------------------------------------------------------- /.bablerc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [[ 3 | "@babel/preset-env", { 4 | "useBuiltIns": "entry" 5 | }], 6 | "@babel/preset-react"], 7 | "plugins": [ 8 | "@babel/plugin-proposal-class-properties", 9 | "@babel/plugin-proposal-export-default-from", 10 | "react-hot-loader/babel" 11 | ] 12 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 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: -------------------------------------------------------------------------------- 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 | dist 10 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 protographql 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
26 | 27 | 2. Navigate to the alternate views within the app using the tabs on the left: **Schema**, **Code**, **Visualize**, and **Tests** 28 | 29 | * **Schema** - view, edut or delete tables you've added. 30 | 31 |
Delete | 30 |Field Name | 31 |Type | 32 |Default Value | 33 |Primary Key | 34 |Unique | 35 |Required | 36 |Queryable | 37 |Table Relationship | 38 |Field Relationship | 39 |Type of Relationship | 40 |
---|
67 |
68 | GraphQL Schema
69 | {gqlSchema}
70 |
71 |
72 | SQL Scripts
73 | {sqlScripts}
74 |
75 |
76 | GraphQL Resolvers
77 | {gqlResolvers}
78 |
79 |
80 | );
81 | }
82 |
83 | export default CodeView;
84 |
--------------------------------------------------------------------------------
/src/components/view/mainView.jsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from 'react';
2 | import SchemaView from '../../components/view/schemaView';
3 | import CodeView from '../../components/view/codeView';
4 | import VisualizeView from '../../components/view/visualizeView';
5 | // import GraphiqlView from './graphiqlView'; // removes unused comoponent
6 | import TableForm from '../popup/tableForm';
7 | import { Store } from '../../state/store';
8 | import TestsView from './testsView';
9 |
10 | function MainView() {
11 | /*
12 | -> connects the application to the context (utilized by Hooks in React) and facilitates the ability to
13 | update the context of the application
14 | -> the context is initialized by useContext() and specified by Store which is found
15 | in /components/state/store.jsx
16 | */
17 | const { state: { view, popUp } } = useContext(Store);
18 | return (
19 | ${queries[0][i]}
`; 187 | } 188 | document.getElementById("queriesDisplay").innerHTML = display; 189 | }); 190 | 191 | 192 | /*-------------------- Functional Component Rendering --------------------*/ 193 | //FOR FUTURE IMPLEMENTATION: Check the user input and maybe ping the endpoint to check that it is live. 194 | return( 195 |
197 |
198 |
199 |
200 |
203 |
204 |
205 |
206 | Current endpoint:
207 |
208 |
209 |
210 |
211 | Insert Your Query Here
212 |
213 |
214 | View Your Query Response Below
215 |
216 |
217 |
218 | Test Queries to Export
219 |
220 |
224 |
225 |
226 |