Skip to content
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

make props optional to avoid passing empty object #3618

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare module 'graphiql-explorer' {
buttonStyle?: CSSProperties;
actionButtonStyle?: CSSProperties;
} | null;
showAttribution: boolean;
showAttribution?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a global search for this prop but couldn't really find anything so sadly I will admit I just made it optional without fully understanding the implications 😓

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's fine, as these are manually maintained types for the external graphql-explorer flow library, I can show a PR where i convert it to ts and adopt it into the repo

hideActions?: boolean;
externalFragments?: FragmentDefinitionNode[];
};
Expand Down
2 changes: 1 addition & 1 deletion packages/graphiql-plugin-explorer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function ExplorerPlugin(props: GraphiQLExplorerPluginProps) {
}

export function explorerPlugin(
props: GraphiQLExplorerPluginProps,
props?: GraphiQLExplorerPluginProps,
): GraphiQLPlugin {
return {
title: 'GraphiQL Explorer',
Expand Down
Loading