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;
- Watch the recording of Oracle Friday Stand-Up - Database Cloud Service
- Clone this Repo with
git clone https://github.com/unofficialoraclecloudhub/oracledb-graphql-demo.git
- 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
- oracle/node-oracledb (also known as just
oracledb
) - stems/join-monster-demo
- MaksymBilenko/docker-oracle-12c
- Github
- Gatsby