issues
search
Rishikant181
/
Rettiwt-API
A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
397
stars
37
forks
source link
Added validation to all args
#285
Closed
Rishikant181
closed
1 year ago
Rishikant181
commented
1 year ago
Added required packages
Added class-validator
Switched from using TweetFilterInterface to TweetFilter class
Added basic validation method to fetcher service
Changed location of interface types for Users and Tweets
Added export for TweetFilter interface
Added TweetClass
Switched from using TweetInterface to Tweet in services
TweetFilter now validates itself after initialization
Added ValidationError object
TweetFilter now throws proper error if it fails to validate
Added proper validation to TweetService.getTweets method filter argument
Added list argument classes
Added validation to TweetListArgs and UserListArgs
Data service methods now use validated arguments
Fixed indentation in Tweet.ts
Services now use User class instead of interface
Added graphql error generator method to base resolver
GraphQL API now returns the error details received from services
Offloaded tweet filter validation from TweetResolver
Renamed CursoredData to CursoredDataInterface and changed it's location
Added CursoredData class
CursoredList can now validate itself and throw error if empty
If CursoredData fails to validate, it throws proper error
removed validation from CursoredList
Separated GraphQL errors from others
Separated interfaces and models
Changed interface naming convention while importing
Updated Types folder structure
Deprecated getUserDetailsById and used a common getUserDetails method
removed unnecessary validation error for services