1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 23:37:41 +00:00

A ton of stuff. Initial migration to React 16. Initial changes for Rooms support. Add support for clip champ badge. Start using .gql source files that are compiled during import so we don't need to include GraphQL-tag in builds.

This commit is contained in:
SirStendec 2018-02-22 18:23:44 -05:00
parent f0bcf7f53e
commit 0ae6e5021d
29 changed files with 536 additions and 263 deletions

View file

@ -7,7 +7,6 @@
import Module from 'utilities/module';
import {has, get} from 'utilities/object';
import gql from 'graphql-tag';
export default class Apollo extends Module {
constructor(...args) {
@ -16,17 +15,8 @@ export default class Apollo extends Module {
this.modifiers = {};
this.post_modifiers = {};
this.gql = gql;
this.inject('..web_munch');
this.inject('..fine');
this.registerModifier('ViewerCard', gql`query {
targetUser: user {
createdAt
profileViewCount
}
}`);
}
async onEnable() {
@ -34,10 +24,10 @@ export default class Apollo extends Module {
let client = this.client;
if ( ! client ) {
const root = this.fine.getParent(this.fine.react),
ctx = root && root._context;
const root = this.fine.react,
inst = root && root.stateNode;
client = this.client = ctx && ctx.client;
client = this.client = inst && inst.props && inst.props.client;
}
this.printer = this.web_munch.getModule('gql-printer');