Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding prefix transforner deactivate caching #1548

Open
trecloux opened this issue Feb 5, 2021 · 4 comments
Open

Adding prefix transforner deactivate caching #1548

trecloux opened this issue Feb 5, 2021 · 4 comments

Comments

@trecloux
Copy link
Contributor

trecloux commented Feb 5, 2021

When I combine the cache transformer with the prefix transformer, it looks like cache transformer is not active anymore.

It looks like this behavior is not specific to prefix transformer.

I pushed and example on the multiple-transformers branch of this demonstrator project https://github.com/MOOM-Planet/graphql-mesh-perf-example/tree/multiple-transformers

@ardatan
Copy link
Owner

ardatan commented Feb 6, 2021

Cache transform should be on top level. Could you move it to the top level and try again? Maybe we should add a warning for that case.

@trecloux
Copy link
Contributor Author

trecloux commented Feb 7, 2021

HI @ardatan , thanks for the hint.

I tried but unfortunately, I do not see any impact. Here is the commit MOOM-Planet/graphql-mesh-perf-example@a5b84a3

@ardatan
Copy link
Owner

ardatan commented Feb 8, 2021

@trecloux Are you sure the field names are correct? Aren't they also prefixed?

@trecloux
Copy link
Contributor Author

trecloux commented Feb 9, 2021

@ardatan, the query fields are not prefixed, here is the query type

type Query {
  #
  #
  # Equivalent to GET /brands/{id}
  getBrandById(id: Int!): MyBrand

  #
  #
  # Equivalent to GET /categories/{id}
  getCategoryById(id: Int!): MyCategory

  #
  #
  # Equivalent to GET /images/{id}
  getImageById(id: Int!): MyImage

  #
  #
  # Equivalent to GET /manufacturers/{id}
  getManufacturerById(id: Int!): MyManufacturer

  #
  #
  # Equivalent to GET /products
  getProducts(
    # Auto-generated argument that limits the size of returned list of objects/list, selecting the first `n` elements of the list
    limit: Int
  ): [MyProduct]
}```

@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
klippx pushed a commit to klippx/graphql-mesh that referenced this issue Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants