Create shot features fragment
This commit is contained in:
parent
5192212e0e
commit
fcdce8706f
10
graphql/fragment/shot-features.ts
Normal file
10
graphql/fragment/shot-features.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
const SHOT_FEATURES_FRAGMENT = gql`
|
||||
fragment ShotFeatures on ShotFeaturesGQL {
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||
}
|
||||
`;
|
||||
|
||||
export default SHOT_FEATURES_FRAGMENT;
|
@ -1,6 +1,8 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import SHOT_FEATURES_FRAGMENT from "./fragment/shot-features";
|
||||
|
||||
export const GET_SHOTS = gql`
|
||||
${SHOT_FEATURES_FRAGMENT}
|
||||
query GetShots(
|
||||
$includeCueObjectAngle: Boolean! = false
|
||||
$includeCueObjectDistance: Boolean! = false
|
||||
@ -13,9 +15,4 @@ export const GET_SHOTS = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment ShotFeatures on ShotFeaturesGQL {
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||
}
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user