How to use the react-relay.createFragmentContainer function in react-relay

To help you get started, we’ve selected a few react-relay examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github artsy / emission / src / lib / Components / Artist / Artworks / index.tsx View on Github external
text: {
    fontSize: 20,
  },
  count: {
    color: colors["gray-semibold"],
  },
  section: {
    marginBottom: 40,
  },
  sectionSeparator: {
    marginTop: 40, // FIXME: This is because the above `section.marginBottom` didn’t work before the separator.
    marginBottom: 20,
  },
})

export default createFragmentContainer(Artworks, {
  artist: graphql`
    fragment Artworks_artist on Artist {
      counts {
        artworks
        for_sale_artworks
      }
      ...ArtistForSaleArtworksGrid_artist
      ...ArtistNotForSaleArtworksGrid_artist
    }
  `,
})
github magma / magma / symphony / app / fbcnms-projects / inventory / app / components / work_orders / WorkOrdersView.js View on Github external
title: 'Assignee',
          getSortingValue: row => row.assignedTo?.email,
          render: row => row.assignedTo?.email || null,
        },
        {
          key: 'closeDate',
          title: 'Close Time',
          getSortingValue: row => row.closeDate,
          render: row => DateTimeFormat.dateTime(row.closeDate),
        },
      ]}
    />
  );
};

export default createFragmentContainer(WorkOrdersView, {
  workOrder: graphql`
    fragment WorkOrdersView_workOrder on WorkOrder @relay(plural: true) {
      id
      name
      description
      owner {
        id
        email
      }
      creationDate
      installDate
      status
      assignedTo {
        id
        email
      }
github OpenCTI-Platform / opencti / opencti-platform / opencti-front / src / private / components / threats / campaigns / CampaignOverview.js View on Github external
);
  }
}

CampaignOverviewComponent.propTypes = {
  campaign: PropTypes.object,
  classes: PropTypes.object,
  t: PropTypes.func,
  fld: PropTypes.func,
};

const CampaignOverview = createFragmentContainer(CampaignOverviewComponent, {
  campaign: graphql`
    fragment CampaignOverview_campaign on Campaign {
      id
      name
      description
      created
      modified
      markingDefinitions {
        edges {
          node {
            id
            definition
          }
        }
      }
      createdByRef {
github kiwicom / mobile / app / native / src / screens / bookings / AllBookingsListRow.js View on Github external
onPress={() => navigate('SingleBooking', { booking: node })}
      separator={showSeparator}
    >
      
    
  );
}

export default createFragmentContainer(
  BookingListRowWithoutData,
  graphql`
    fragment AllBookingsListRow_node on Booking {
      departure {
        localTime
        ...RouteStop
      }
      arrival {
        ...RouteStop
      }
    }
  `,
);
github OpenCTI-Platform / opencti / opencti-platform / opencti-front / src / private / components / threats / threat_actors / ThreatActorIndicators.js View on Github external
)}
        />
      
    );
  }
}

ThreatActorIndicatorsComponent.propTypes = {
  threatActor: PropTypes.object,
  location: PropTypes.object,
  classes: PropTypes.object,
  t: PropTypes.func,
};

const ThreatActorIndicators = createFragmentContainer(
  ThreatActorIndicatorsComponent,
  {
    threatActor: graphql`
      fragment ThreatActorIndicators_threatActor on ThreatActor {
        id
        name
        alias
      }
    `,
  },
);

export default compose(
  inject18n,
  withRouter,
  withStyles(styles),
github artsy / emission / src / lib / Scenes / Home / Components / Sales / Components / SaleListItem.tsx View on Github external
LIVE
                
              )}
            
            <footer>
              
            </footer>
          
        
      
    )
  }
}

export default createFragmentContainer(SaleListItem, {
  sale: graphql`
    fragment SaleListItem_sale on Sale {
      name
      href
      liveURLIfOpen
      liveStartAt
      displayTimelyAt
      coverImage {
        url(version: "large")
      }
    }
  `,
})
github artsy / emission / src / lib / Scenes / ArtworkAttributionClassFAQ / ArtworkAttributionClassFAQ.tsx View on Github external
Our partners are responsible for providing accurate classification information for all works.
            
            
              <button> SwitchBoard.dismissNavigationViewController(this)} block&gt;
                OK
              </button>
            
          
        
      
    )
  }
}

export const ArtworkAttributionClassFAQContainer = createFragmentContainer(ArtworkAttributionClassFAQ, {
  artworkAttributionClasses: graphql`
    fragment ArtworkAttributionClassFAQ_artworkAttributionClasses on AttributionClass @relay(plural: true) {
      name
      longDescription
    }
  `,
})

export const ArtworkAttributionClassFAQRenderer: React.SFC&lt;{ safeAreaInsets: SafeAreaInsets }&gt; = props =&gt; {
  return (
    
      environment={defaultEnvironment}
      query={graphql`
        query ArtworkAttributionClassFAQRendererQuery {
          artworkAttributionClasses {
            ...ArtworkAttributionClassFAQ_artworkAttributionClasses
github artsy / reaction / src / Apps / Artwork / ArtworkApp.tsx View on Github external
<footer>
            
          

          <div id="lightbox-container">
          
            {({ mediator }) =&gt; &lt;&gt;{this.enableIntercomForBuyers(mediator)}}
          
        
      
    )
  }
}

export const ArtworkAppFragmentContainer = createFragmentContainer(
  ArtworkApp,
  graphql`
    fragment ArtworkApp_artwork on Artwork {
      id
      _id
      is_acquireable
      is_offerable
      availability
      price
      is_in_auction
      artists {
        _id
        id
      }
      artist {
        id</div></footer>
github magma / magma / symphony / app / fbcnms-projects / inventory / app / components / work_orders / WorkOrdersMap.js View on Github external
}}
          /&gt;
        );
      }}
      getFeatureHoverPopoutContent={feature =&gt; (
        
      )}
    /&gt;
  );
};

export default withRouter(
  createFragmentContainer(WorkOrdersMap, {
    workOrders: graphql`
      fragment WorkOrdersMap_workOrders on WorkOrder @relay(plural: true) {
        id
        name
        description
        owner {
          id
          email
        }
        status
        priority
        assignedTo {
          id
          email
        }
        installDate
github artsy / emission / src / lib / Scenes / Artwork / Components / CommercialButtons / BidButton.tsx View on Github external
} else {
      const myLastMaxBid = hasBid &amp;&amp; myLotStanding.mostRecentBid.maxBid.cents
      const increments = saleArtwork.increments.filter(increment =&gt; increment.cents &gt; (myLastMaxBid || 0))
      const firstIncrement = increments &amp;&amp; increments.length &amp;&amp; increments[0]
      const incrementCents = firstIncrement &amp;&amp; firstIncrement.cents

      return (
        <button size="large" width="{100}"> this.redirectToBid(incrementCents)}&gt;
          {hasBid ? "Increase max bid" : "Bid"}
        </button>
      )
    }
  }
}

export const BidButtonFragmentContainer = createFragmentContainer(BidButton, {
  artwork: graphql`
    fragment BidButton_artwork on Artwork {
      slug
      sale {
        slug
        registrationStatus {
          qualifiedForBidding
        }
        isPreview
        isLiveOpen
        isClosed
        isRegistrationClosed
      }
      myLotStanding(live: true) {
        mostRecentBid {
          maxBid {