This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change options name to fix AC collision and add flow smoke test
- Loading branch information
James Baxley
committed
May 30, 2017
1 parent
9ee0cc5
commit 401f604
Showing
7 changed files
with
75 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ignore] | ||
.*/examples/**/.* | ||
.*/node_modules/art/.* | ||
.*/node_modules/react-native/**/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
./index.js.flow | ||
|
||
[options] | ||
suppress_comment= \\(.\\|\n\\)*\\$ExpectError |
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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
This file is used to validate the flow typings for react-apollo. | ||
Currently it just serves as a smoke test around used imports and | ||
common usage patterns. | ||
Ideally this should include tests for all of the functionality of | ||
react-apollo | ||
*/ | ||
|
||
// @flow | ||
import { graphql } from "react-apollo"; | ||
import type { OperationComponent } from "react-apollo"; | ||
import type { DocumentNode } from "graphql"; | ||
import gql from "graphql-tag"; | ||
|
||
const query: DocumentNode = gql`{ foo }`; | ||
const mutation: DocumentNode = gql`mutation { foo }`; | ||
|
||
type IQuery = { | ||
foo: string, | ||
}; | ||
|
||
// common errors | ||
|
||
const withData: OperationComponent<IQuery> = graphql(query); | ||
|
||
const ComponentWithData = withData(({ data: { foo }}) => { | ||
// $ExpectError | ||
if (foo > 1) return <span />; | ||
|
||
return null; | ||
}); |