Skip to content

Commit

Permalink
Passed missing props from the Middlware (#912)
Browse files Browse the repository at this point in the history
* fix: add shareEnabled option in the props

* fix: pass fix endpoint from the props and removed unused redux code

* fix: revert fixEndpoint removal from the store
  • Loading branch information
pantharshit00 authored and huv1k committed Jan 27, 2019
1 parent 204fac7 commit c65900c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Expand Up @@ -62,7 +62,7 @@ export interface Props {
subscriptionEndpoint?: string
projectId?: string
shareEnabled?: boolean
adminAuthToken?: string
fixedEndpoint?: boolean
onSuccess?: (graphQLParams: any, response: any) => void
isEndpoint?: boolean
isApp?: boolean
Expand Down Expand Up @@ -302,6 +302,7 @@ export class Playground extends React.PureComponent<Props & ReduxProps, State> {
) : (
<GraphQLEditor
shareEnabled={this.props.shareEnabled}
fixedEndpoint={this.props.fixedEndpoint}
schema={this.state.schema}
/>
)}
Expand Down
Expand Up @@ -75,6 +75,7 @@ import { ResponseRecord } from '../../state/sessions/reducers'
export interface Props {
onRef?: any
shareEnabled?: boolean
fixedEndpoint?: boolean
schema?: GraphQLSchema
}

Expand Down Expand Up @@ -167,7 +168,10 @@ class GraphQLEditor extends React.PureComponent<Props & ReduxProps> {
return (
<Container>
<EditorWrapper>
<TopBar shareEnabled={this.props.shareEnabled} />
<TopBar
shareEnabled={this.props.shareEnabled}
fixedEndpoint={this.props.fixedEndpoint}
/>
<EditorBar
ref={this.setEditorBarComponent}
onMouseDown={this.handleResizeStart}
Expand Down
Expand Up @@ -44,6 +44,8 @@ export interface PlaygroundWrapperProps {
subscriptionEndpoint?: string
setTitle?: boolean
settings?: ISettings
shareEnabled?: string
fixedEndpoint?: string
folderName?: string
configString?: string
showNewWorkspace?: boolean
Expand Down Expand Up @@ -376,6 +378,7 @@ class PlaygroundWrapper extends React.Component<
)}
<Playground
endpoint={this.state.endpoint}
shareEnabled={this.props.shareEnabled}
subscriptionEndpoint={this.state.subscriptionEndpoint}
shareUrl={this.state.shareUrl}
onChangeEndpoint={this.handleChangeEndpoint}
Expand All @@ -392,6 +395,7 @@ class PlaygroundWrapper extends React.Component<
onSaveConfig={this.handleSaveConfig}
onUpdateSessionCount={this.handleUpdateSessionCount}
fixedEndpoints={Boolean(this.state.configString)}
fixedEndpoint={this.props.fixedEndpoint}
headers={combinedHeaders}
configPath={this.props.configPath}
workspaceName={
Expand Down

0 comments on commit c65900c

Please sign in to comment.