Steams / ra-data-hasura-graphql

React-admin data provider for Hasura GraphQL endpoints
MIT License
211 stars 33 forks source link

Not compatible with ra 3.9.x #67

Open narayanpromax opened 3 years ago

narayanpromax commented 3 years ago

Not compatible with ra 3.9.x

Type '(f: FetchType, r: ResourceType, params: object) => { data: any; }' is not assignable to type 'DataProvider | LegacyDataProvider'.
  Type '(f: FetchType, r: ResourceType, params: object) => { data: any; }' is not assignable to type 'LegacyDataProvider'.
    Types of parameters 'f' and 'type' are incompatible.
      Type 'string' is not assignable to type 'FetchType'.ts(2322)
types.d.ts(307, 5): The expected type comes from property 'dataProvider' which is declared here on type 'IntrinsicAttributes & AdminProps & { children?: ReactNode; }'
datakurre commented 3 years ago

Isn't issue only with typescript? So, should work with:

declare module 'ra-data-hasura-graphql';

in ./@types/ra-data-hasura-graphql/index.d.ts

I'm currently using this in a typescript ra-project with the latest versions without this issue.