https://github.com/mochafreddo/tweetql
TweetQL is a simple GraphQL server that provides a basic API for tweets and users.
https://github.com/mochafreddo/tweetql
graphql nomadcoders
Last synced: 14 days ago
JSON representation
TweetQL is a simple GraphQL server that provides a basic API for tweets and users.
- Host: GitHub
- URL: https://github.com/mochafreddo/tweetql
- Owner: mochafreddo
- Created: 2024-02-12T14:11:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T01:05:58.000Z (over 2 years ago)
- Last Synced: 2025-03-02T22:34:04.121Z (over 1 year ago)
- Topics: graphql, nomadcoders
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TweetQL
TweetQL is a simple GraphQL server that provides a basic API for tweets and users.
## Installation
To install the dependencies, run:
```sh
npm install
```
## Running the Server
To start the server, run:
```sh
npm run dev
```
This will start the server on `localhost:4000` (or the port specified in your environment variables).
## API
The server provides the following GraphQL queries:
- `allTweets`: Returns all tweets.
- `tweet(id: ID!)`: Returns a specific tweet by its ID.
- `allUsers`: Returns all users.
And the following GraphQL mutations:
- `postTweet(text: String!, userId: ID!)`: Posts a new tweet.
- `deleteTweet(id: ID!)`: Deletes a tweet by its ID.
## Dependencies
- apollo-server: ^3.13.0
- graphql: ^16.8.1
- node-fetch: ^3.3.2
## Dev Dependencies
- nodemon: ^3.0.3
## Reference
- [Nomad Coders: GraphQL로 영화 API 만들기](https://nomadcoders.co/graphql-for-beginners)