-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-headless-cms): add getExecutableSchema utility
- Loading branch information
Showing
4 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
packages/api-headless-cms/__tests__/contentAPI/aco/setup/updateLocationGraphQlPlugin.ts
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
9 changes: 8 additions & 1 deletion
9
packages/api-headless-cms/src/plugins/CmsGraphQLSchemaPlugin.ts
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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
import { GraphQLSchemaPlugin } from "@webiny/handler-graphql"; | ||
import { GraphQLSchemaPlugin, GraphQLSchemaPluginConfig } from "@webiny/handler-graphql"; | ||
import { Context } from "@webiny/api/types"; | ||
import { CmsContext } from "~/types"; | ||
|
||
export class CmsGraphQLSchemaPlugin<T = CmsContext> extends GraphQLSchemaPlugin<T> { | ||
public static override type = "cms.graphql.schema"; | ||
} | ||
|
||
export const createCmsGraphQLSchemaPlugin = <TContext = Context>( | ||
params: GraphQLSchemaPluginConfig<TContext> | ||
) => { | ||
return new CmsGraphQLSchemaPlugin<TContext>(params); | ||
}; |
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