This file contains 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 fetch from 'cross-fetch'; | |
import { gql, ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'; | |
const client = new ApolloClient({ | |
link: new HttpLink({ uri: 'https://48p1r2roz4.sse.codesandbox.io', fetch }), | |
cache: new InMemoryCache() | |
}); | |
client | |
.query({ | |
query: gql` | |
query GetRates { |
This file contains 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, useQuery} from '@apollo/client'; | |
const EXCHANGE_RATES = gql` | |
query GetExchangeRates { | |
rates(currency: "USD") { | |
currency | |
rate | |
} | |
} | |
`; |
This file contains 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 ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import fetch from 'cross-fetch'; | |
import { gql, ApolloProvider, ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'; | |
const endpoint = 'https://48p1r2roz4.sse.codesandbox.io' // apolloのGetting Started |
This file contains 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 './App.css'; | |
import './ExchangeRates' | |
import ExchangeRates from "./ExchangeRates"; | |
export default function App() { | |
return ( | |
<div> | |
<h2>My first Apollo app 🚀</h2> |
This file contains 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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title FlashTransfer | |
* @dev Simple blind transfer contract | |
*/ | |
contract BlindTransfer { | |
OlderNewer