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

To help you get started, we’ve selected a few react-relay-offline 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 morrys / offline-examples / relay / react-native / todo-updater / src / components / Todo.tsx View on Github external
{isEditing && (
        
      )}
    
  );*/
};

export default createFragmentContainer(Todo, {
  todo: graphql`
    fragment Todo_todo on Todo {
      complete
      id
      text
    }
  `,
  user: graphql`
    fragment Todo_user on User {
      id
      userId
      totalCount
      completedCount
    }
  `,
});
github morrys / offline-examples / relay / react-native / todo-updater / src / components / TodoList.tsx View on Github external
onChange={handleMarkAllChange}
        type="checkbox"
      />

      <label>Mark all as complete</label>

      <ul>
        {nodes.map((node: Node) =&gt; (
          
        ))}
      </ul>
    
  );*/
};

export default createFragmentContainer(TodoList, {
  user: graphql`
    fragment TodoList_user on User {
      todos(
        first: 2147483647 # max GraphQLInt
      ) @connection(key: "TodoList_todos") {
        edges {
          node {
            id
            complete
            ...Todo_todo
          }
        }
      }
      id
      userId
      totalCount
github morrys / wora / packages / mui / examples / todo / src / shared / components / TodoApp.tsx View on Github external
return (
    
  );
};


export default createFragmentContainer(TodoApp, {
  user: graphql`
    fragment TodoApp_user on User {
      id
      userId
      totalCount
      completedCount
      ...TodoList_user
      ...TodoListFooter_user
    }
  `,
});
/*

      ...TodoListFooter_user
      
*/
github morrys / offline-examples / relay / todo-updater / js / components / TodoApp.js View on Github external
Retry
        
        <button>
          Purge
        </button>

        <footer>
          <p>Double-click to edit a todo</p>
        </footer>
      
      
    
  );
};

export default createFragmentContainer(TodoApp, {
  user: graphql`
    fragment TodoApp_user on User {
      id
      userId
      totalCount
      completedCount
      ...TodoListFooter_user
      ...TodoList_user
    }
  `,
});
github morrys / wora / examples / wora-todo / shared / components / TodoApp.tsx View on Github external
const hasTodos = user.totalCount &gt; 0;

  return (
    
      
        
          Todos
        
        {hasTodos &amp;&amp; }
        
    
  );
};


export default createFragmentContainer(TodoApp, {
  user: graphql`
    fragment TodoApp_user on User {
      id
      userId
      totalCount
      completedCount
      ...TodoListFooter_user
    }
  `,
});
/*

      ...TodoListFooter_user
      
*/
github morrys / offline-examples / relay / nextjs / components / TodoApp.tsx View on Github external
{hasTodos &amp;&amp; }
        
          Retry
          Purge
        
        
          Double-click to edit a todo
        
      
      {/* TODO fix layout */}
    
  );
};

export default createFragmentContainer(AppTodo, {
  user: graphql`
    fragment TodoApp_user on User {
      id
      userId
      totalCount
      completedCount
      ...TodoListFooter_user
      ...TodoList_user
    }
  `,
});
github morrys / offline-examples / relay / react-native / todo-updater / src / components / TodoApp.tsx View on Github external
},
    header: {

    },
    welcome: {
      textAlign: 'center',
      margin: 10,
    },
    instructions: {
      textAlign: 'center',
      color: '#333333',
      marginBottom: 5,
    },
  });

export default createFragmentContainer(TodoApp, {
  user: graphql`
    fragment TodoApp_user on User {
      id
      userId
      totalCount
      completedCount
      ...TodoListFooter_user
      ...TodoList_user
    }
  `,
});
/*

      ...TodoListFooter_user
      
*/