TweetQL is a simple GraphQL server that provides a basic API for tweets and users.
To install the dependencies, run:
npm install
To start the server, run:
npm run dev
This will start the server on localhost:4000
(or the port specified in your environment variables).
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.
- apollo-server: ^3.13.0
- graphql: ^16.8.1
- node-fetch: ^3.3.2
- nodemon: ^3.0.3