Skip to content

Commit

Permalink
replaced getFragmentDefinitions with getFragmentDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
Poincare committed Jul 1, 2016
1 parent 7b7c1a6 commit f7e8d16
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
} from '../src/networkInterface';

import {
getFragmentDefinitions,
getFragmentDefinition,
} from '../src/queries/getFromAST';

describe('QueryManager', () => {
Expand Down Expand Up @@ -2414,15 +2414,15 @@ describe('QueryManager', () => {

describe('fragment referencing', () => {
it('should accept a list of fragments and let us reference them through fetchQuery', (done) => {
const fragment1 = getFragmentDefinitions(gql`
const fragment1 = getFragmentDefinition(gql`
fragment authorDetails on Author {
firstName
lastName
}`)[0];
const fragment2 = getFragmentDefinitions(gql`
}`);
const fragment2 = getFragmentDefinition(gql`
fragment personDetails on Person {
name
}`)[0];
}`);
const fragments = [fragment1, fragment2];
const query = gql`
query {
Expand Down Expand Up @@ -2474,15 +2474,15 @@ describe('QueryManager', () => {
});
});
it('should accept a list of fragments and let us reference them from mutate', (done) => {
const fragment1 = getFragmentDefinitions(gql`
const fragment1 = getFragmentDefinition(gql`
fragment authorDetails on Author {
firstName
lastName
}`)[0];
const fragment2 = getFragmentDefinitions(gql`
}`);
const fragment2 = getFragmentDefinition(gql`
fragment personDetails on Person {
name
}`)[0];
}`);
const fragments = [fragment1, fragment2];
const mutation = gql`
mutation changeStuff {
Expand Down

0 comments on commit f7e8d16

Please sign in to comment.