npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-relay-var-id

v0.9.4

Published

A framework for building data-driven React applications.

Downloads

6

Readme

About this fork

Currently in upstream Relay, the assumption is made that the id field is globally unique as specified in the Global Object Identification specification. However, in our case this conflicted with an already existing id field in our schema that was being consumed by non-Relay clients, changing this would have broken those clients.

After deliberation, the conclusion was that the simplest solution would be to make it easy for people to fork Relay and change the hardcoded instances of id to whatever suits their needs. It also became apperant that there is a chance that the GraphQL specification itself will gain a reserved ID field that may be used by tools such as Relay to for whatever identification purpose.

As of yet, the name for that future ID field most likely is going to be __id, which is what this fork uses. This fork will be maintained, as in, kept up-to-date with upstream releases.

You can install the packages as per the npm install <tarball url> documentation.

See:

  • https://github.com/facebook/relay/issues/1061
  • https://github.com/facebook/relay/pull/1232
  • https://github.com/facebook/graphql/issues/188

Update process

  • If not previously done, add the upstream remote: $ git remote add upstream https://github.com/facebook/relay.git
  • Fetch upstream changes: $ git fetch upstream && git merge upstream/master
  • Check that the upstream changes do not re-introduce a hardcoded use of 'id'. If it does, submit a PR upstream to fix that.
  • Push changes to our remote: $ git push origin __id
  • Create release with packages: $ node release.js [GITHUB-TOKEN]
  • Afterwards, your git checkout will be dirty, there’s no need to keep those changes: $ git checkout .

Relay Build Status npm version

Relay is a JavaScript framework for building data-driven React applications.

  • Declarative: Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.
  • Colocation: Queries live next to the views that rely on them, so you can easily reason about your app. Relay aggregates queries into efficient network requests to fetch only what you need.
  • Mutations: Relay lets you mutate data on the client and server using GraphQL mutations, and offers automatic data consistency, optimistic updates, and error handling.

Learn how to use Relay in your own project.

Example

The relay-examples repository contains an implementation of TodoMVC. To try it out:

git clone https://github.com/relayjs/relay-examples.git
cd relay-examples/todo && npm install
npm start

Then, just point your browser at http://localhost:3000.

Contribute

We actively welcome pull requests, learn how to contribute.

Users

We have a community-maintained list of people and projects using Relay in production.

License

Relay is BSD licensed. We also provide an additional patent grant.