0.3.1 • Published 5 years ago

@quesk/types v0.3.1

Weekly downloads
4
License
MIT
Repository
-
Last release
5 years ago

@quesk/types

With this package, you are installing the types needed for the correct typing of the Quesk models (from GraphQL).

Installation & Usage

Since this is a public package, you can install the package in your project using yarn or npm. Use one of the following two command to install the package:

$ yarn add @quesk/types
$ npm install --save @quesk/types

When you want to use the package, it's important to know, that there is no default export in this package. We are only exporting the variables/constants/types/interfaces that are shown below this paragraph.

To use the package, please use the following import lines:

import { Category } from '@quesk/types'

type Root = Category & { isAnotherType: boolean }

Introspection

You can see the introspection of the queries we are supporting on http://emily.quesk.io/graphiql.

Types

Category

Representing a Category object from GraphQL.

NameType
namestring
questionCountnumber
followedByUserboolean

User

Representing a User object from GraphQL.

NameType
firstNamestring
lastNamestring
namestring
locationstring
tagLinestring
websitestring
biographystring
avatarUrlstring
isCurrentUserboolean
isVerifiedboolean
isFollowedByCurrentUserboolean
interestedInArray of type Category
savedQuestionsArray of type Question
askedQuestionsArray of type Question
answersArray of type Answer
receivedUpvotesCountnumber
followerCountnumber
answersCountnumber

Answer

Representing a Answer object from GraphQL.

NameType
bodystring
authorSingle entity of type User`
createdAtISO Date String
updatedAtISO Date String
voteCountnumber
userIsAuthorboolean
upvotedByCurrentUserboolean
downvotedByCurrentUserboolean
question?Single entity of type Question

Question

Representing a Question object from GraphQL.

NameType
titlestring
bodystring
impressionCountnumber
categorySingle entity of type Category
categoryIdstring
hasTopAnswerboolean
isAnonymousboolean
topAnswerSingle entity of type Answer
answersArray of type Answer
authorSingle entity of type User
userHasSavedboolean
userIsAuthorboolean
createdAtISO Date String
updatedAtISO Date String