Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dipakparmar/ca-business-registry-graphql
A GraphQL API for retrieving information about businesses registered in Canada.
https://github.com/dipakparmar/ca-business-registry-graphql
canada graphql-api graphql-yoga
Last synced: 28 days ago
JSON representation
A GraphQL API for retrieving information about businesses registered in Canada.
- Host: GitHub
- URL: https://github.com/dipakparmar/ca-business-registry-graphql
- Owner: dipakparmar
- License: agpl-3.0
- Created: 2023-01-30T06:03:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T12:11:10.000Z (about 1 year ago)
- Last Synced: 2024-09-28T21:23:18.206Z (about 1 month ago)
- Topics: canada, graphql-api, graphql-yoga
- Language: TypeScript
- Homepage:
- Size: 309 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraphQL API for Canada Business Registry
A GraphQL API for retrieving information about businesses registered in Canada. The API is built using GraphQL, a modern and flexible query language for APIs.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
## Prerequisites
What things you need to install the software and how to install them:
- Node.js v16 or higher
- npm v6 or higher
- yarn or npm package manager ( I prefer yarn )### Installing
1. Install as dependency:
```bash
yarn add @dipakparmar/ca-business-registry-graphql
```
2. Setup a server using the following code:```js
import { createCABusinessRegistryGraphQLServer } from '@dipakparmar/ca-business-registry-graphql'const server = createCABusinessRegistryGraphQLServer({
landingPage: true,
graphqlEndpoint: '/alpha/graphql',
graphiql: true,
})server.listen(4000, () => {
console.log('🚀 Server ready at http://localhost:4000')
})
```3. Start the dev server:
```bash
yarn dev
```The server should now be running on http://localhost:4000 or port specified in .env file. You can now open the GraphQL Playground at http://localhost:4000/alpha/graphql to start querying the API.
## Usage
The API supports the following query fields:
- SearchBusiness(keyword: String, page: Int): BusinessSearchResult
# Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
3. Commit your changes (`git commit -ams -S 'Add some feature'`)
4. Push to the branch (`git push origin feature/my-new-feature`)
5. Create a new Pull Request## License
This project is licensed with the [AGPL-3.0 License](https://github.com/dipakparmar/ca-business-registry-graphql/blob/main/LICENSE).