/oracledb-graphql-demo

Learning Material for GraphQL+OracleDB. Run in the cloud☁️ or Docker🐳. Batteries included.

Primary LanguageSQLPLMIT LicenseMIT

Oracle db with GraphQl πŸš€

GraphQL seems cool. Oracle database is cool. Let's combine them.

About

These materials go along with the Oracle Friday Stand-Up - Database Cloud Service Given by @sblack4. They are free to take and use but we provide no warranty per the MIT LICENSE but feel free to submit an issue or a pull request! I love solving problems and meeting other nerdy devs! ✌️

Getting Started

  • Connect to Oracle Database with oracledb (a πŸ”₯ database)
  • Build SQL Queries with knex (think: ORM)
  • Convert GraphQL and SQL with join monster (GraphQL <-> SQL translator)
  • Serve the GraphQL with koa (basically express-lite)
  • Visualize cool GraphQL browser with graphiql (execute graphql queries in the browser)

tl:dr;

  1. Watch the recording of Oracle Friday Stand-Up - Database Cloud Service
  2. Clone this Repo with git clone https://github.com/unofficialoraclecloudhub/oracledb-graphql-demo.git
  3. Head to unofficialoraclecloudhub.github.io/oracledb-graphql-demo/ and follow the directions in the docs

Test with 🐳 Docker 🐳

If you have docker, you can run database and the server

Docker images for Oracle Databse 12c and node 6 are provided in the Docker folder

The easiest way to build them is

cd Docker
docker-compose build
docker-compose up

Whats actually in here?

$ tree -d -I node_modules
.
β”œβ”€β”€ Docker                  # all the files and binaries to build
β”‚   β”œβ”€β”€ db                  # the docker images 
β”‚   β”‚   └── oracle-sql      # one with oracle database xe 12c
β”‚   └── web                 # the other with node 6 & the oracle instantclient libraries
β”œβ”€β”€ docs                    # the docs static site (Gatsby)
β”‚   β”œβ”€β”€ content
β”‚   β”‚   β”œβ”€β”€ lessons
β”‚   β”‚   └── posts
β”‚   β”œβ”€β”€ data
β”‚   β”œβ”€β”€ public
β”‚   β”‚   β”œβ”€β”€ about
β”‚   β”‚   β”œβ”€β”€ categories
β”‚   β”‚   β”‚   └── tech
β”‚   β”‚   β”œβ”€β”€ lesson-five
β”‚   β”‚   β”œβ”€β”€ lesson-four
β”‚   β”‚   β”œβ”€β”€ lesson-one
β”‚   β”‚   β”œβ”€β”€ lesson-six
β”‚   β”‚   β”œβ”€β”€ lesson-three
β”‚   β”‚   β”œβ”€β”€ lesson-two
β”‚   β”‚   β”œβ”€β”€ logos
β”‚   β”‚   β”œβ”€β”€ post-one
β”‚   β”‚   └── static
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”‚   β”œβ”€β”€ About
β”‚   β”‚   β”‚   β”œβ”€β”€ Disqus
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout
β”‚   β”‚   β”‚   β”œβ”€β”€ PostListing
β”‚   β”‚   β”‚   β”œβ”€β”€ PostTags
β”‚   β”‚   β”‚   └── SocialLinks
β”‚   β”‚   β”œβ”€β”€ layouts
β”‚   β”‚   β”‚   └── css
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   └── templates
β”‚   └── static
β”‚       └── logos
└── src                     # the graphql app
    β”œβ”€β”€ common
    β”œβ”€β”€ data                # you can do the same thing with sqlite 
    β”‚   β”œβ”€β”€ demo-data-csv   # and maybe postgres (I have not tested)
    β”‚   β”œβ”€β”€ postgress
    β”‚   └── sqllite
    β”œβ”€β”€ schema-basic
    β”œβ”€β”€ schema-paginated
    └── test                

45 directories

Acknowledgements ❀️

The open source community has been overly generous with software and documentation (as always)

Special thanks to