import { Injectable } from '@angular/core';
import { environment } from '@dest-env/environment';
@Injectable({
providedIn: 'root'
})
export class GmapService {
private static promise;
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
#!/bin/bash | |
for tag in $(git tag) | |
do | |
git tag "${tag/v/}" $tag | |
done | |
for tag in $(git tag) | |
do | |
if [[ $tag = *v* ]] |
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 { Injectable, NgZone } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
import { environment } from '@dest-env/environment'; | |
import { Destination } from './destination'; | |
import { OpenFlight } from './open-flight'; | |
@Injectable({ | |
providedIn: 'root', |
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 { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { ApolloLink, split } from 'apollo-link'; | |
import { onError } from 'apollo-link-error'; | |
import { HttpLink } from 'apollo-link-http'; | |
import { BatchHttpLink } from 'apollo-link-batch-http'; | |
// add fragments from apollo endpoint | |
import { fragmentMatcher } from './fragment-matcher'; | |
// TODO: link http://gateway:8080/graphql and https://foo.bar/graphql for each environment |
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 { compose, graphql } from 'react-apollo'; | |
import { QueryOne, QueryTwo } from './graphql.query'; | |
import { OneQuery, TwoQuery } from '../../lib/_generated-types'; | |
type InputProps = { | |
productId: number; | |
}; | |
type Variables = { |
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 { MockedProvider } from '@apollo/react-testing'; | |
import { renderHook } from '@testing-library/react-hooks'; | |
// import { DATA_9200000111963040 } from '../../../server/test/__mocks__/stubs/product-9200000111963040'; | |
import { useGetProductQuery } from '../../lib/_generated-hooks'; | |
// import { GET_PRODUCT } from './get-product.graphql'; | |
import gql from 'graphql-tag'; | |
import { FRAGMENT_PRODUCT } from '../../lib/fragments/product.fragment.graphql'; |
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
// MODULE | |
import React, { | |
FC, | |
ReactNode, | |
useState, | |
useEffect, | |
createContext, | |
useContext, | |
useCallback, | |
} from 'react'; |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "attach", | |
"name": "ah: API", |
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
// This is a mock request function | |
const sendRequest = (url) => { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(`request resolved ${url}`) | |
}, 2000) | |
}) | |
} | |
// Helper: split array in batches |
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
``` | |
Summary: | |
Total: 30.7128 secs | |
Slowest: 1.7595 secs | |
Fastest: 0.4397 secs | |
Average: 1.0356 secs | |
Requests/sec: 38.2577 | |
Total data: 315681375 bytes | |
Size/request: 268665 bytes |
OlderNewer