scouttracker/src/containers/ScoutOverview.js

23 lines
460 B
JavaScript
Raw Normal View History

2017-07-06 17:28:41 +00:00
import React from "react";
import { gql, graphql } from 'react-apollo';
function ScoutOverview({data, scoutID}) {
console.log(data);
return (
<div>
{data.getScout && data.getScout.displayName}
</div>
);
}
export default graphql(gql`
query GetScoutData($scoutID:ID!){
getScout(id: $scoutID){
displayName
}
}
`,{options : ({scoutID}) => {
console.log("Building var! scoutId: ", scoutID);
return {variables: {scoutID}};
}})(ScoutOverview);