This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function exportTable() { | |
| var table = document.getElementById('errors'), | |
| header = 'type,line,column,title,description,browser\n', | |
| csv, | |
| data = [], | |
| i, node; | |
| for (i = 0; i < table.childNodes.length; i += 1) { | |
| node = table.childNodes[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import {fromJS} from 'immutable'; | |
| import ServerError from '../app/components/shared/ServerError.jsx'; | |
| class Renderer { | |
| constructor(services, callback, req) { | |
| this.services = services; | |
| if (typeof callback === 'function') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| graphql, | |
| GraphQLInt, | |
| GraphQLString, | |
| GraphQLFloat, | |
| GraphQLBoolean, | |
| GraphQLList, | |
| GraphQLObjectType, | |
| GraphQLSchema | |
| } from 'graphql'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| graphql, | |
| GraphQLInt, | |
| GraphQLString, | |
| GraphQLFloat, | |
| GraphQLBoolean, | |
| GraphQLList, | |
| GraphQLNonNull, | |
| GraphQLObjectType, | |
| GraphQLSchema |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Getting a post with its title, author, blocks, likes and comments | |
| post(id: 123) { | |
| title, | |
| author { | |
| username, | |
| avatar_url | |
| }, | |
| blocks { | |
| type, | |
| text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| graphql, | |
| GraphQLObjectType, | |
| GraphQLInt, | |
| GraphQLString, | |
| GraphQLSchema | |
| } from 'graphql'; | |
| import PostType from './PostType.js'; | |
| import User from '../models/User.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { GQLQuery } from './GQLQuery.js'; | |
| @GQLQuery | |
| class CommentsAndLikes extends React.Component { | |
| static queries = { | |
| commentAndLikes() { | |
| return ` | |
| likes { | |
| id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function GQLQuery(Component) { | |
| Component.getQuery = function (name, ...params) { | |
| return this.queries[name].apply(this, params); | |
| }; | |
| return Component; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let PostMutationType = new GraphQLObjectType({ | |
| name: 'PostType', | |
| fields: () => ({ | |
| like: { | |
| type: PostLikeType, | |
| args: { | |
| postId: { | |
| name: 'postId', | |
| type: GraphQLInt | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @GQLQuery | |
| class CommentsAndLikes extends React.Component { | |
| static queries = { | |
| commentAndLikes() { | |
| return ` | |
| likes { | |
| id, | |
| user { | |
| id | |
| } |
OlderNewer