This file contains hidden or 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
| import { ApolloProvider } from 'react-apollo' | |
| import { ApolloClient } from 'apollo-boost' | |
| import EnabledFeatures from './EnabledFeatures' | |
| import FlaggedFeature from './FlaggedFeature' | |
| const client = new ApolloClient() | |
| const App = () => ( | |
| <React.Fragment> |
This file contains hidden or 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
| import { Query } from 'react-apollo' | |
| import PropTypes from 'prop-types' | |
| import React from 'react' | |
| import { queryEnabledFeatures } from './graphql/query' | |
| class EnabledFeatures extends React.Component { | |
| static propTypes = { | |
| children: PropTypes.func.isRequired | |
| } |
This file contains hidden or 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
| import { ApolloProvider } from 'react-apollo' | |
| import { ApolloClient } from 'apollo-boost' | |
| import FlaggedFeature from './FlaggedFeature' | |
| const client = new ApolloClient() | |
| ReactDOM.render( | |
| <ApolloProvider client={client}> | |
| <FlaggedFeature name="feature1"> |
This file contains hidden or 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
| import { Query } from 'react-apollo' | |
| import PropTypes from 'prop-types' | |
| import React from 'react' | |
| import { queryEnabledFeatures } from './graphql/query' | |
| class FlaggedFeature extends React.Component { | |
| static propTypes = { | |
| children: PropTypes.func.isRequired, | |
| name: PropTypes.string.isRequired |
This file contains hidden or 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
| import gql from 'graphql-tag' | |
| export const queryEnabledFeatures = gql` | |
| query { | |
| enabledFeatures { | |
| name | |
| } | |
| } | |
| ` |
This file contains hidden or 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
| type Query { | |
| enabledFeatures: [Feature!]! | |
| } | |
| type Feature { | |
| name: String! | |
| } |
This file contains hidden or 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
| // ... | |
| const customClient = new ApolloClient({ | |
| uri: "http://other-api/graphql" | |
| }); | |
| const Dogs = ({ onDogSelected }) => ( | |
| <Query query={GET_DOGS} client={customClient} > | |
| {({ loading, error, data }) => { | |
| if (loading) return "Loading..."; | |
| if (error) return `Error! ${error.message}`; |
This file contains hidden or 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
| // https://github.com/apollographql/react-apollo/blob/master/src/Query.tsx#L167 | |
| // https://github.com/apollographql/react-apollo/blob/master/src/Mutation.tsx#L120 | |
| ... | |
| this.client = props.client || context.client; | |
| ... |
This file contains hidden or 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
| import React from "react"; | |
| import { render } from "react-dom"; | |
| import { ApolloProvider } from "react-apollo"; | |
| import ApolloClient from "apollo-boost"; | |
| const client = new ApolloClient({ | |
| uri: "https://w5xlvm3vzz.lp.gql.zone/graphql" | |
| }); |
This file contains hidden or 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
| package com.peao.nunes.hystrix.configuration; | |
| import com.netflix.hystrix.contrib.servopublisher.HystrixServoMetricsPublisher; | |
| import com.netflix.hystrix.strategy.HystrixPlugins; | |
| import com.peao.nunes.hystrix.notifier.CircuitBreakerNotifier; | |
| public class HystrixConfiguration { | |
| public static void configureHystrix(){ | |
| HystrixConfiguration.configureEventNotifier(); |
NewerOlder