How to use the react-apollo.withApollo function in react-apollo

To help you get started, we’ve selected a few react-apollo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github connexta / admin-console / ui / src / main / webapp / wizards / ldap / stages / network-settings.js View on Github external
{
                onStartSubmit()
                onEndSubmit()
                next('bind-settings')
              }}
            />
          
        
      
    )
  }
}

export default withApollo(NetworkSettings)
github guandjoy / redfish / src / react-app / src / application / notes / AddNote.js View on Github external
onChange={e => onContentChange(e)}
                ref={contentInputRef}
              />
            
          
          <button type="submit">Save</button>
        
      
      {isActive &amp;&amp; (
        <div> setDeactivate(true)} /&gt;
      )}
    
  );
}

export default withApollo(AddNote);
</div>
github wandb / client / wandb / board / ui / src / containers / HistoryLoader.js View on Github external
const withData = graphql(FAKE_HISTORY_QUERY, {
    options: ({histQueryKey}) => {
      return {
        fetchPolicy: 'cache-only',
        variables: {
          histQueryKey: histQueryKey,
        },
      };
    },
    props: ({data, errors}) => ({
      historyBuckets: (data.project && data.project.runs) || {edges: []},
    }),
  });

  return withApollo(withData(HistoryLoader));
}
github Thorium-Sim / thorium / src / components / views / LongRangeComm / index.js View on Github external
}
      power {
        power
        powerLevels
      }
    }
  }
`;
export default graphql(QUEUING_QUERY, {
  options: ownProps => ({
    fetchPolicy: "cache-and-network",
    variables: {
      simulatorId: ownProps.simulator.id
    }
  })
})(withApollo(LongRangeComm));
github SaraVieira / awesome-talks / src / Components / Search.js View on Github external
ref={node =&gt; (this.input = node)}
                            onBlur={this.onBlur}
                            onChange={this.onChange}
                            onFocus={this.onFocus}
                            onKeyDown={this.handleKeyDown}
                            placeholder="Search"
                            type="text"
                        /&gt;
                    
                )}
            
        )
    }
}

export default withApollo(Search)
github Thorium-Sim / thorium / src / components / views / PhaserCharging / index.js View on Github external
state
        charge
        heat
      }
      arc
      holdToCharge
    }
  }
`;

export default graphql(PHASERS_QUERY, {
  options: ownProps => ({
    fetchPolicy: "cache-and-network",
    variables: {simulatorId: ownProps.simulator.id},
  }),
})(withApollo(PhaserCharging));
github Thorium-Sim / thorium / client / src / components / views / JrOps / transporter.js View on Github external
report
      }
      power {
        power
        powerLevels
      }
    }
  }
`;

export default graphql(TRANSPORTERS_QUERY, {
  options: ownProps => ({
    fetchPolicy: "cache-and-network",
    variables: { simulatorId: ownProps.simulator.id }
  })
})(withApollo(Transporters));
github elifesciences / elife-xpub / packages / component-login / client / pages / LogoutPage.js View on Github external
constructor(props) {
    super(props)
    window.localStorage.removeItem('token')
    this.props.client.resetStore()

    if (config.logout.redirectUrl) {
      window.location = config.logout.redirectUrl
    }
  }

  render() {
    return 
  }
}

export default withApollo(LogoutPage)
github Thorium-Sim / thorium / client / src / containers / FlightDirector / MissionConfig / index.js View on Github external
timelineItems {
          id
          args
          delay
          event
          name
          type
          needsConfig
          noCancelOnReset
        }
      }
    }
  }
`;

const MissionsConfigData = withApollo(
  ({
    match: {
      params: { missionId }
    },
    client,
    history
  }) =&gt; {
    return (
      
        {({ loading, data, subscribeToMore }) =&gt; {
          if (loading || !data) return null;
          const mission = data.missions[0];
          return loading || !data ? null : (
            
                subscribeToMore({
github Thorium-Sim / thorium / client / src / components / views / Status / components / alertCondition.js View on Github external
delay={{ show: 0, hide: 0 }}
                    &gt;
                      
                     */}
                  
                ))}
              
            
          )
        }
      
    );
  }
}

export default withApollo(AlertCondition);