Skip to content

TweetQL is a simple GraphQL server that provides a basic API for tweets and users.

Notifications You must be signed in to change notification settings

mochafreddo/tweetql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TweetQL

TweetQL is a simple GraphQL server that provides a basic API for tweets and users.

Installation

To install the dependencies, run:

npm install

Running the Server

To start the server, run:

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

About

TweetQL is a simple GraphQL server that provides a basic API for tweets and users.

Topics

Resources

Stars

Watchers

Forks