I hereby claim:
- I am jaroslav-kubicek on github.
- I am kubajz (https://keybase.io/kubajz) on keybase.
- I have a public key ASDXOWgEHdfV9ZSIkhsm82dRQq57hpBuAxdUw1LFt0CQyAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// @flow | |
import { | |
GraphQLObjectType, | |
GraphQLList, | |
GraphQLString, | |
GraphQLInt, | |
GraphQLNonNull, | |
GraphQLSchema, | |
} from 'graphql'; |
{ | |
"node": { | |
"outbound": { | |
"departure": { | |
"cityId": "prague_cz", | |
"localTime": "2018-06-30T17:30:00.000Z" | |
} | |
}, | |
"allowedBaggage": { | |
"cabin": [ |
I hereby claim:
To claim this, I am signing this object:
{ | |
"additional_bookings": { | |
"details": [] | |
}, | |
"arrival": { | |
"when": 0, | |
"where": { | |
"code": "VKO", | |
"name": "Moscow" | |
} |
// -------------------------------------- | |
// Mock GraphQL requests with stubs. | |
// Inspiration: https://github.com/cypress-io/cypress-documentation/issues/122 | |
// -------------------------------------- | |
Cypress.Commands.add('visitWithMockedGraphQL', (page, stubs) => { | |
cy.visit(page, { | |
onBeforeLoad: win => { | |
cy.stub(win, 'fetch', handleFetch(stubs)); | |
}, | |
}); |
module.exports = { | |
entry: { | |
main: './src/app.js', | |
}, | |
output: { | |
// `filename` provides a template for naming your bundles (remember to use `[name]` or `[contenthash]`) | |
filename: '[name].bundle.js', | |
// `chunkFilename` provides a template for naming code-split bundles (optional) | |
chunkFilename: '[name].bundle.js', | |
// `path` is the folder where Webpack will place your bundles |
// @flow | |
import * as React from 'react'; | |
import { createFragmentContainer, graphql } from 'react-relay'; | |
import { ThemeContext } from 'styled-components'; | |
import { withRouter } from 'react-router-dom'; | |
import { | |
Ticket, | |
Airplane, | |
InformationCircle, |
// @flow | |
import * as React from 'react'; | |
import { mount } from 'enzyme'; | |
import { QueryRenderer, graphql } from '@adeira/relay'; | |
import { createMockEnvironment, MockPayloadGenerator } from 'relay-test-utils'; | |
describe('Component', () => { | |
it('Shows something', () => { | |
const environment = createMockEnvironment(); |
/* @flow */ | |
// uncomment this comment :) // flowlint unclear-type:error | |
// SEE https://flow.org/en/docs/linting/rule-reference/#toc-unclear-type | |
// "any" type - not very helpful | |
const foo: any = 42; | |
foo.bar.baz |