How to use the @orbit/jsonapi.JSONAPISerializer function in @orbit/jsonapi

To help you get started, we’ve selected a few @orbit/jsonapi 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 sillsdev / appbuilder-portal / source / SIL.AppBuilder.Portal.Frontend / src / data / store.ts View on Github external
import { JSONAPISerializer } from '@orbit/jsonapi';

import { api as apiEnv } from '@env';

import { defaultHeaders } from '@lib/fetch';

import { schema, keyMap } from './schema';

export const serializer = new JSONAPISerializer({ schema, keyMap });

// DEBUG!
// Orbit.fetch = (...args) => {
//   console.log(args);
//   return fetch(...args);
// };

export function defaultOptions() {
  return {
    sources: {
      remote: {
        settings: {
          ...defaultSourceOptions(),
        },
      },
    },

@orbit/jsonapi

JSON:API support for Orbit.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular @orbit/jsonapi functions