How to use the graphql-anywhere.filter function in graphql-anywhere

To help you get started, we’ve selected a few graphql-anywhere 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 assembl / assembl / assembl / static2 / js / app / app.jsx View on Github external
props: ({ data }) => {
      if (data.error || data.loading) {
        return {
          error: data.error,
          timeline: [], // empty timeline to avoid to block the whole app until timeline data is loaded
          timelineLoading: data.loading
        };
      }

      const filteredPhases = filter(TimelineQuery, { timeline: data.timeline });
      const phasesForStore = filteredPhases.timeline.map(phase => ({
        id: phase.id,
        identifier: phase.identifier,
        isThematicsTable: phase.isThematicsTable,
        start: phase.start,
        end: phase.end,
        image: phase.image,
        title: phase.title,
        description: phase.description
      }));
      return {
        error: data.error,
        timelineLoading: data.loading,
        timeline: phasesForStore
      };
    }
github assembl / assembl / assembl / static2 / js / app / pages / administration.jsx View on Github external
putTextFieldsInStore(textFields) {
    if (textFields) {
      const filtered = filter(TextFields, { textFields: textFields });
      this.props.updateTextFields(filtered.textFields);
    }
  }
github sedubois / relate / containers / Profile.js View on Github external
function Profile({ data: { User } }) {
  if (!User) {
    return ;
  }
  return (
    <div>
      <style>{`
        .profile {
          margin: 0 1em;
        }
      `}</style>
      
      {User.facilitatedRetreats.length &gt; 0 &amp;&amp;
        }
      {User.tracks.length &gt; 0 &amp;&amp; }
    </div>
  );
}
github n1ru4l / graphql-schema-generator-rest / src / rest-link.js View on Github external
.then(result => {
          observer.next({ data: filter(operation.query, result) })
          observer.complete()
        })
        .catch(err => {
github decidim / decidim / decidim-comments / app / frontend / support / resolve_graphql_query.ts View on Github external
const resolveGraphQLQuery = (document: any, options: any = {}) => {
  const { filterResult, rootValue, context, variables } = options;

  const result = graphql(
    resolver,
    document,
    rootValue,
    context,
    variables
  );

  if (filterResult) {
    return filter(document, result);
  }
  return result;
};
github assembl / assembl / assembl / static2 / js / app / pages / administration.jsx View on Github external
putSectionsInStore = (sections) => {
    if (sections) {
      const filteredSections = filter(SectionsQuery, {
        sections: sections.filter(section => section.sectionType !== 'ADMINISTRATION')
      });
      this.props.updateSections(filteredSections.sections);
    }
  };
github assembl / assembl / assembl / static2 / js / app / pages / administration.jsx View on Github external
putLandingPageModulesInStore = (landingPageModules) => {
    if (landingPageModules) {
      const filtered = filter(LandingPageModules, { landingPageModules: landingPageModules });
      const landingPageModulesWithUpdatedTitles = addEnumSuffixToModuleTitles(filtered.landingPageModules);
      this.props.updateLandingPageModules(landingPageModulesWithUpdatedTitles);
    }
  };
github davidyaha / graphql-workshop / client / src / components / FollowList.js View on Github external
  static filter = data => filter(FollowList.fragments.user, data);

graphql-anywhere

Run GraphQL queries with no schema and just one resolver

MIT
Latest version published 2 years ago

Package Health Score

80 / 100
Full package analysis