Skip to content
Permalink
Browse files

fix(gatsby): Mark plugin parameter as optional for actions (#22546)

* mage plugin parameter optional

* set plugin argumnent optional

Co-authored-by: ondrejch <ondrejch@kentico.com>
  • Loading branch information
Simply007 and ondrejch committed Mar 26, 2020
1 parent e733c36 commit 6d1356c770eb890a5b0ec1204de040eeeb546f5e
Showing with 6 additions and 6 deletions.
  1. +1 −1 packages/gatsby/index.d.ts
  2. +5 −5 packages/gatsby/src/redux/actions/restricted.js
@@ -1100,7 +1100,7 @@ export interface Actions {
/** @see https://www.gatsbyjs.org/docs/actions/#createFieldExtension */
createFieldExtension(
extension: object,
plugin: ActionPlugin,
plugin?: ActionPlugin,
traceId?: string
): void
}
@@ -22,7 +22,7 @@ const actions = {}
*/
actions.addThirdPartySchema = (
{ schema }: { schema: GraphQLSchema },
plugin: Plugin,
plugin?: Plugin,
traceId?: string
) => {
return {
@@ -181,7 +181,7 @@ actions.createTypes = (
| GraphQLOutputType
| GatsbyGraphQLType
| Array<string | GraphQLOutputType | GatsbyGraphQLType>,
plugin: Plugin,
plugin?: Plugin,
traceId?: string
) => {
return {
@@ -239,7 +239,7 @@ import type GraphQLFieldExtensionDefinition from "../../schema/extensions"
*/
actions.createFieldExtension = (
extension: GraphQLFieldExtensionDefinition,
plugin: Plugin,
plugin?: Plugin,
traceId?: string
) => (dispatch, getState) => {
const { name } = extension || {}
@@ -299,7 +299,7 @@ actions.printTypeDefinitions = (
exclude?: { types?: Array<string>, plugins?: Array<string> },
withFieldTypes?: boolean,
},
plugin: Plugin,
plugin?: Plugin,
traceId?: string
) => {
return {
@@ -347,7 +347,7 @@ actions.printTypeDefinitions = (
*/
actions.createResolverContext = (
context: object,
plugin: Plugin,
plugin?: Plugin,
traceId?: string
) => dispatch => {
if (!context || typeof context !== `object`) {

0 comments on commit 6d1356c

Please sign in to comment.
You can’t perform that action at this time.