This file contains 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
module Main where | |
import Prelude | |
import App.Control.Monad (Futbol, runFutbol) | |
import App.Types (AppEffects, SomeEffects) | |
import Control.Monad.Aff.AVar (AVAR) | |
import Control.Monad.Aff.Console (CONSOLE) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Exception (EXCEPTION) |
This file contains 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
// connectionDefinitions returns a connectionType and its associated edgeType, given a node type. | |
const { | |
connectionType: VideoConnection, | |
edgeType: VideoEdge | |
} = connectionDefinitions({ | |
nodeType: videoType, | |
connectionFields: () => ({ | |
totalCount: { | |
type: GraphQLInt, | |
description: "A count of the total number of objects in this connection.", |
This file contains 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
newtype Result = | |
Result { goalsHomeTeam :: Number | |
, goalsAwayTeam :: Number | |
} | |
newtype Fixture = | |
Fixture { _links:: LinkGroup | |
, date:: String | |
, status:: String | |
, matchday:: Number |
This file contains 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
{ | |
"name": "reactcards", | |
"version": "0.4.0", | |
"description": "devcards for react", | |
"license": "BSD-3-Clause", | |
"main": "dist/client.bundle.js", | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/steos/reactcards.git" | |
}, |
This file contains 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
var path = require('path') | |
var webpack = require('webpack') | |
module.exports = { | |
context: path.join(__dirname, "src"), | |
entry: { | |
client: './index' | |
}, | |
output: { | |
filename: "[name].bundle.js", |
This file contains 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
createMessage(){ | |
Relay.Store.update(new CreateMessageMutation({ | |
user: this.props.user, | |
conversation: foundEdge.node, | |
receiverId: receiverId, | |
body: this.state.curText | |
}), {onFailure, onSuccess}); | |
} | |
This file contains 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
exports.getPlaylistById = (root, {id}) => { | |
return new Promise((resolve, reject) => { | |
Playlist.findOne({id:id}).populate('songs').exec((err, res) => { | |
err ? reject(err) : resolve(res); | |
}) | |
}); | |
}; | |
exports.addSong = ({id, youtubeLink}) => { | |
return new Promise((resolve, reject) => { |
This file contains 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
ListingType = GraphQL::ObjectType.define do | |
name "Listing" | |
description "Book listing by user" | |
global_id_field :id | |
field :id, !types.ID | |
field :user, !UserType, "if of user who owns book" | |
field :price, !types.Float | |
end |