-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Hide page elements based on query param
* Hides global promo, nav menu and secondary menu if query param kivaAppReferral=true exists GD-139
- Loading branch information
Eddie Ferrer
committed
Oct 12, 2021
1 parent
628e0f5
commit fce519b
Showing
6 changed files
with
58 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default () => { | ||
return { | ||
resolvers: { | ||
Query: { | ||
isKivaAppReferral(obj, args) { | ||
// Takes an argument of the query param value | ||
// and returns a boolean if it is present and equal to true | ||
return args?.kivaAppReferralQueryParam === 'true'; | ||
}, | ||
} | ||
}, | ||
}; | ||
}; |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
query isKivaAppReferral($kivaAppReferralQueryParam: String) { | ||
isKivaAppReferral(kivaAppReferralQueryParam: $kivaAppReferralQueryParam) @client | ||
} |