clean request

This commit is contained in:
okbel
2018-07-09 11:44:52 -03:00
parent 50de9a7f84
commit 6210ae6077
3 changed files with 2 additions and 22 deletions
@@ -20,13 +20,8 @@ const enhanced = withFragmentContainer<{ data: Data }>(
fragment AppContainer on Query
@argumentDefinitions(
assetID: { type: "ID!" }
commentID: { type: "ID" }
showAssetList: { type: "Boolean!" }
showPermalink: { type: "Boolean!" }
) {
comment(id: $commentID) @include(if: $showPermalink) {
id
}
assets @include(if: $showAssetList) {
...AssetListContainer_assets
}
@@ -6,7 +6,6 @@ type Network {
type Local {
network: Network!
assetID: String
commentID: String
}
extend type Query {
+2 -16
View File
@@ -33,19 +33,9 @@ const AppQuery: StatelessComponent<InnerProps> = props => {
return (
<QueryRenderer<AppQueryVariables, AppQueryResponse>
query={graphql`
query AppQuery(
$assetID: ID!
$commentID: ID
$showAssetList: Boolean!
$showPermalink: Boolean!
) {
query AppQuery($assetID: ID!, $showAssetList: Boolean!) {
...AppContainer
@arguments(
assetID: $assetID
commentID: $commentID
showAssetList: $showAssetList
showPermalink: $showPermalink
)
@arguments(assetID: $assetID, showAssetList: $showAssetList)
}
`}
variables={{
@@ -53,9 +43,6 @@ const AppQuery: StatelessComponent<InnerProps> = props => {
assetID: props.local.assetID || (null as any),
// TODO: This is set to false, as server does not support querying assets yet.
showAssetList: !props.local.assetID && false,
commentID: props.local.commentID || (null as any),
showPermalink: false,
}}
render={render}
/>
@@ -66,7 +53,6 @@ const enhanced = withLocalStateContainer<Local>(
graphql`
fragment AppQueryLocal on Local {
assetID
commentID
}
`
)(AppQuery);