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
import readdir from 'fs-readdir-recursive'; | |
import { List } from 'linqts'; | |
import _ from 'lodash'; | |
import { IAudioMetadata, parseFile } from 'music-metadata'; | |
import path from 'path'; | |
type Common = IAudioMetadata["common"]; | |
export interface Track { | |
path: string; |
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
import React from "react"; | |
import { MessagesQuery, MessagesQueryVariables } from "../../queries"; | |
import { graphql, QueryProps } from "react-apollo"; | |
import Message from "./Message"; | |
// IMPORTANT: The query is required, not imported. | |
const query = require("./Messages.graphql"); | |
const POLL_INTERVAL = 7901; |
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
#import './Message.graphql' | |
query Messages($threadKey: String!) { | |
viewer { | |
id | |
messages(threadKey: $threadKey) { | |
edges { | |
node { | |
id | |
...Message | |
} |
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
import gql from "graphql-tag"; | |
import React from "react"; | |
interface Props { | |
message: any; | |
} | |
export default class Message extends React.PureComponent<Props, undefined> { | |
public render() { | |
return <div>message body</div>; |
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
apollo-codegen generate frontend/react/**/*.graphql \ | |
--schema frontend/schema.json \ | |
--target typescript \ | |
--output frontend/react/queries.ts |
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
import gql from "graphql-tag"; | |
import ShowingRequest from "./ShowingRequest"; | |
import Deals from "./Deals"; | |
const query = gql` | |
query Client($pk: ID!) { | |
viewer { | |
id | |
agent { | |
id |
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
[ | |
{ | |
"kind": "OBJECT", | |
"name": "Message", | |
"description": null, | |
"fields": [ | |
{ | |
"name": "id", | |
"description": "The ID of the object.", | |
"args": [], |
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
import React from "react"; | |
import { Link } from "react-router-dom"; | |
import { MessageFragment } from "../../queries"; | |
import DateFormat from "../DateFormat"; | |
export interface Props { | |
message: MessageFragment; | |
} |
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
export type MessageFragment = { | |
// The ID of the object. | |
id: string; | |
body: string; | |
createdOn: string; | |
// Slug specifying a custom message type. | |
messageType: string; | |
author: { | |
name: string; | |
email: string; |
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
fragment Message on Message { | |
id | |
body | |
createdOn | |
messageType | |
author | |
} |