stacker.news/api/typeDefs/user.js

27 lines
439 B
JavaScript
Raw Normal View History

2021-03-25 19:29:24 +00:00
import { gql } from 'apollo-server-micro'
export default gql`
extend type Query {
me: User
2021-05-21 22:32:21 +00:00
user(name: String!): User
2021-03-25 19:29:24 +00:00
users: [User!]
2021-05-21 22:32:21 +00:00
nameAvailable(name: String!): Boolean!
2021-03-25 19:29:24 +00:00
}
2021-05-22 00:09:11 +00:00
extend type Mutation {
setName(name: String!): Boolean
}
2021-03-25 19:29:24 +00:00
type User {
id: ID!
name: String
2021-04-22 22:14:32 +00:00
nitems: Int!
ncomments: Int!
stacked: Int!
2021-05-25 00:08:56 +00:00
freePosts: Int!
freeComments: Int!
2021-04-22 22:14:32 +00:00
sats: Int!
2021-05-12 23:04:19 +00:00
msats: Int!
2021-03-25 19:29:24 +00:00
}
`