graphiti-api / spraypaint.js

Graphiti Client / Javascript ORM / JSONAPI
MIT License
108 stars 69 forks source link

Add custom fetcher config option #90

Open jkcorrea opened 3 years ago

jkcorrea commented 3 years ago

Adds an option to use your own fetch function:

import { Model, SpraypaintBase } from 'spraypaint'
import ky from 'ky'

const apiClient = ky.extend({})

@Model()
class ApplicationRecord extends SpraypaintBase {
  static fetcher = apiClient
}