Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dinubs/coolqlcool
Nextjs server to query websites with GraphQL
https://github.com/dinubs/coolqlcool
graphql javascript nextjs schema web-scraping
Last synced: 30 days ago
JSON representation
Nextjs server to query websites with GraphQL
- Host: GitHub
- URL: https://github.com/dinubs/coolqlcool
- Owner: dinubs
- Created: 2017-12-10T05:58:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T07:18:31.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T17:56:23.770Z (about 1 month ago)
- Topics: graphql, javascript, nextjs, schema, web-scraping
- Language: JavaScript
- Homepage: https://cool.coolql.cool
- Size: 4.22 MB
- Stars: 633
- Watchers: 14
- Forks: 48
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - coolqlcool - Nextjs server to query websites with GraphQL (JavaScript)
README
# Cool QL COOL
[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/dinubs/coolqlcool)
CoolQLCool (CQC) is an open source Graph QL server that allows you to turn websites into a Graph QL api. You can play around with it in [GraphiQL](https://coolql.cool/graphiql).
Important pieces of code are in `schema/`. Inside of `schema/element.js` is the schema for grabbing element information from pages. Inside of `schema/parse.js` is the schema for specifying which site you want to query.
All fields have a description alongside the function for determining what to return. If you have any questions on what a field returns feel free to make an issue and I can explain further what it does.
### Deploying
You can very quickly run your own CQC server using [Now](https://zeit.co/now). After you're all set up with a Zeit account, run `npm run deploy` in your terminal in this repo's directory. This will compile webpack for you, and run `now` for you. If you don't need the home page, simply run `now`.
### Running
The important bits are able to be ran with `npm start` this boots up an express server with endpoints `/graphql` for creating queries, and a `/graphiql` endpoint for help with building queries.
To compile assets for the home page do `webpack --watch`.
### Alternatives
Here's some other applications and tools that also do similar things as CoolQLCool. They're all great:
* [GDOM](https://github.com/syrusakbary/gdom) - DOM Traversing and Scraping using GraphQL
* [GraphQL Scraper](https://github.com/lachenmayer/graphql-scraper) - Extract structured data from the web using GraphQL