GraphQL queries dont work on React Native

I am using strapi for a project on RactJS and ReactNative

but the queries I use on ReactNative return with empy data,
I thought it was the nested filtering becuase I was trying to acces a filed inside a relation , but then i changed my collections to have the filter in the same level and it works on the playground but not on react native ( Using apollo)

this is on the playground

on react native I get :

{“errors”:[{“message”:“Field “sku” is not defined by type “InventoryFiltersInput”.”,“locations”:[{“line”:2,“column”:58}],“extensions”:{“code”:“GRAPHQL_VALIDATION_FAILED”}}]

It looks like the error message you’re receiving is related to a field that is not defined in the InventoryFiltersInput type. Specifically, it seems like you’re trying to use the sku field in a nested filter, but it’s not defined as a valid field for that type.

Here are some steps you can take to resolve this issue:

  1. Make sure that the sku field is defined in the appropriate type in your Strapi schema. You may need to add it if it’s not already defined.
  2. Check the syntax of your GraphQL query to make sure that you’re using the correct field names and types. You may need to adjust the query to use the correct field names.
  3. If you’re using a GraphQL client like Apollo, make sure that the schema on the client side matches the schema on the server side. You may need to regenerate your client-side schema to ensure that it matches the server schema.
  4. If you’ve made changes to the schema, make sure that you’ve restarted your Strapi server to apply the changes.

If you’re still having issues, try simplifying your query and removing any nested filters to see if you can get data back from the server. Once you have that working, you can gradually add in more complex filters and queries to narrow down your results.