Last active
March 29, 2018 10:38
-
-
Save jbaxleyiii/f3839bfd6d122a04a7b9096cd0c5fb57 to your computer and use it in GitHub Desktop.
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
const videoAssetWithDuration = { | |
args: (source, args, context, info) => ({ id: source.id }), | |
fetcher: (id) => fetch(`/api/v1/assets/${id}`), | |
definition: gql` | |
fragment VideoAssetWithDuration($id: ID) on Asset { | |
title | |
description | |
metdata { | |
date | |
info | |
} | |
... on VideoAsset { | |
duration | |
} | |
} | |
`, | |
resolvers: { | |
metadata: (source) => source.Metadata | |
} | |
} | |
Author
jbaxleyiii
commented
Mar 17, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment