CHANGELOG-relay.md
Don't cache a global node identification config #51
To migrate, assign your node identification helper to the schema:
NodeIdentification = GraphQL::Relay::GlobalNodeIdentification.define { ... }
MySchema.node_identification = NodeIdentification
startCursor and endCursor to PageInfo #60field: keyword for connection helper #58BaseType.define_connection no longer caches the result to use as the default BaseType.connection_type. Now, store the result of .define_connection in a variable and pass that variable into the schema:
# Capture the returned type:
SomethingCustomConnectionType = SomethingType.define_connection { ... }
DifferentThingType = GraphQL::ObjectType.define do
# And pass it to the connection helper:
connection :somethings, SomethingCustomConnectionType
end
graphql 0.14.0 #47id field may have a description #43max_page_size even when no arguments are presentRemove the order argument from connection fields. This isn't part of the spec and shouldn't have been there in the first place!
You can implement this behavior with a custom argument, for example:
field :cities, CityType.connection_type do
argument :order, types.String, default_value: "name"
resolve ->(obj, args, ctx) {
obj.order(args[:order])
}
end
to_global_id and from_global_idgraphql 0.12+count(*) when testing next page with ActiveRecord #28max_page_size option for connectionsid when passed into to_global_idGlobalNodeIdentification#object_from_id(id, ctx) now accepts context as the second argument #9