Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PARENT
- const query = graphql.experimental`
- query MyRootComponentQuery($employeeId: String!, $includeOvertime: Boolean) {
- employee(id: $employeeId) {
- fullName
- ...MyFragmentComponent_employee @arguments(includeOvertime: $includeOvertime)
- }
- }
- `
- // CHILD
- const fragments = {
- employee: graphql.experimental`
- fragment MyFragmentComponent_employee on Employee
- @argumentDefinitions(includeOvertime: { type: "Boolean", defaultValue: false }) {
- hoursWorked(includeOvertime: $includeOvertime)
- dob
- fullName
- id
- }
- `,
- }
Add Comment
Please, Sign In to add comment