-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check organization beta flags for gated template specifications #4271
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
ec8cdf1
to
952083d
Compare
We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset. |
Coverage report
Show new covered files 🐣
Test suite run success1808 tests passing in 822 suites. Report generated by 🧪jest coverage report action from fc2858d |
c9f0457
to
91b7b46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
* @param organizationId - Organization ID as a numeric value. | ||
* @param variables - GraphQL variables to pass to the query. | ||
* @returns The response of the query of generic type <T>. | ||
*/ | ||
export async function businessPlatformOrganizationsRequest<TResult>( | ||
export async function businessPlatformOrganizationsRequestDoc<TResult>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused. Why do we need two functions to run the query? Is this related to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first function above uses classic manually typed schemas, while this function uses auto-generated types.
I do eventually need to learn more about the auto-generated stuff, but I think for this PR it's not relevant, as the GraphQL string is generated at runtime.
91b7b46
to
fc2858d
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/api/business-platform.d.ts@@ -24,10 +24,20 @@ export declare function businessPlatformRequestDoc<TResult, TVariables extends V
*
* @param query - GraphQL query to execute.
* @param token - Business Platform token.
+ * @param organizationId - Organization ID as a numeric (non-GID) value.
+ * @param variables - GraphQL variables to pass to the query.
+ * @returns The response of the query of generic type <T>.
+ */
+export declare function businessPlatformOrganizationsRequest<T>(query: string, token: string, organizationId: string, variables?: GraphQLVariables): Promise<T>;
+/**
+ * Executes a GraphQL query against the Business Platform Organizations API. Uses typed documents.
+ *
+ * @param query - GraphQL query to execute.
+ * @param token - Business Platform token.
* @param organizationId - Organization ID as a numeric value.
* @param variables - GraphQL variables to pass to the query.
* @returns The response of the query of generic type <T>.
*/
-export declare function businessPlatformOrganizationsRequest<TResult>(query: TypedDocumentNode<TResult, GraphQLVariables> | TypedDocumentNode<TResult, Exact<{
+export declare function businessPlatformOrganizationsRequestDoc<TResult>(query: TypedDocumentNode<TResult, GraphQLVariables> | TypedDocumentNode<TResult, Exact<{
[key: string]: never;
}>>, token: string, organizationId: string, variables?: GraphQLVariables): Promise<TResult>;
\ No newline at end of file
|
WHY are these changes introduced?
Fills in a stubbed-out bit which is now made possible by @gracejychang's recent work connecting us to Business Platform!
WHAT is this pull request doing?
Rather than stubbing out feature flags, actually check for their presence!
How to test your changes?
organizationBetaFlag
).app generate extension
and note that the gated template doesn't appear.Maintenance::CreateFeatureFlagTask
maintenance task.Measuring impact
How do we know this change was effective? Please choose one:
Checklist