File size: 1,289 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// @flow
import user from './rootUser';
import currentUser from './rootCurrentUser';

import email from './email';
import coverPhoto from './coverPhoto';
import profilePhoto from './profilePhoto';
import everything from './everything';
import communityConnection from './communityConnection';
import channelConnection from './channelConnection';
import directMessageThreadsConnection from './directMessageThreadsConnection';
import threadConnection from './threadConnection';
import threadCount from './threadCount';
import settings from './settings';
import isAdmin from './isAdmin';
import contextPermissions from './contextPermissions';
import githubProfile from './githubProfile';

// no-op resolvers to transition while removing payments
import type { DBUser } from 'shared/types';
const isPro = (dbUser: DBUser) => dbUser.betaSupporter;
const recurringPayments = () => [];
const invoices = () => [];

module.exports = {
  Query: {
    user,
    currentUser,
  },
  User: {
    email,
    coverPhoto,
    profilePhoto,
    everything,
    communityConnection,
    channelConnection,
    directMessageThreadsConnection,
    threadConnection,
    threadCount,
    settings,
    isAdmin,
    githubProfile,
    contextPermissions,
    isPro,
    recurringPayments,
    invoices,
  },
};