diff options
author | Michael Muré <batolettre@gmail.com> | 2019-05-22 23:31:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 23:31:46 +0200 |
commit | 8c263465fbd956f2964bb7cd911b5ea5e8d5a50e (patch) | |
tree | f6ed073888a8610100f5e79aa44d8bca6a76c723 /webui/src/Author.js | |
parent | 6e20bf0e73862854aea0cd759a880a6b5f473880 (diff) | |
parent | 1c2ee10ce7a32df892604846279c7e199ce0ccea (diff) | |
download | git-bug-8c263465fbd956f2964bb7cd911b5ea5e8d5a50e.tar.gz |
Merge pull request #149 from MichaelMure/sandhose/authored
graphql: Implement `Authored` whenever possible
Diffstat (limited to 'webui/src/Author.js')
-rw-r--r-- | webui/src/Author.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/webui/src/Author.js b/webui/src/Author.js index 7bb1bf3c..237a7956 100644 --- a/webui/src/Author.js +++ b/webui/src/Author.js @@ -1,3 +1,4 @@ +import gql from 'graphql-tag'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; import MAvatar from '@material-ui/core/Avatar'; import React from 'react'; @@ -14,6 +15,17 @@ const Author = ({ author, ...props }) => { ); }; +Author.fragment = gql` + fragment authored on Authored { + author { + name + email + displayName + avatarUrl + } + } +`; + export const Avatar = ({ author, ...props }) => { if (author.avatarUrl) { return <MAvatar src={author.avatarUrl} {...props} />; |