Giter Site home page Giter Site logo

Comments (7)

j0k3r avatar j0k3r commented on May 5, 2024

As far as I understand best practices are to keep your old field and add the new one.
Then you flag this old field as deprecated (isDeprecated) in your schema.

https://facebook.github.io/graphql/#sec-Object-Field-deprecation

But yeah I agree that a dedicated section about versioning could be a good idea.

from graphql.github.io.

benben avatar benben commented on May 5, 2024

Thansk for your reply. I just saw that Facebook is still versioning their GraphQL API in the URI. Two other questions: How do you deprecate a whole type? How do you deal with mutations?

from graphql.github.io.

stubailo avatar stubailo commented on May 5, 2024

I just saw that Facebook is still versioning their GraphQL API in the URI.

Are they? I haven't heard anything about this, as far as I know they've been using the same schema since the beginning. If anything, I suspect this is because they have rewritten the entire syntax and so they would need a separate endpoint for the old query language.

How do you deprecate a whole type? How do you deal with mutations?

I imagine you would deprecate all fields that point to that type. And you can deprecate mutations the same way, since they are just normal fields.

from graphql.github.io.

benben avatar benben commented on May 5, 2024

@stubailo See here https://developers.facebook.com/docs/graph-api/overview/#versions

from graphql.github.io.

stubailo avatar stubailo commented on May 5, 2024

The Graph API is not the same thing as GraphQL, even though they have similar names. Facebook doesn't have a public GraphQL API at all.

from graphql.github.io.

stubailo avatar stubailo commented on May 5, 2024

The need for a versioning page is already recorded in the new site plan: #41

Going to close this issue then.

from graphql.github.io.

benben avatar benben commented on May 5, 2024

The Graph API is not the same thing as GraphQL, even though they have similar names. Facebook > doesn't have a public GraphQL API at all.

Ah right, then I messed it up a bit 😊
Thanks for clarifying and working on it!

from graphql.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.