Comments (9)
@michaelstaib I agree that these "feature opt-ins" are going to be important, and that's what I was getting at too. The easiest approach is likely to allow a list of fully qualified spec URIs as opposed to a single URI.
from graphql-over-http.
👍 The spec identifier would need to be parsable, and ideally able to communicate which features it supports (for example, sending via POST only, multipart, websocket, etc).
from graphql-over-http.
request to the URL that claims to be a GraphQL HTTP
Do you mean root address like http://example.org ?
Response comes with a Header like X-GRAPHQL-HTTP that includes a link to the published spec
Do you mean link to download SDL document from or http://example.org/graphql
link to send requests?
from graphql-over-http.
Do you mean root address like http://example.org ?
The route where that handles the GraphQL requests since the root address could be handled by a completely different server. So if your GraphQL endpoint is http://foo.com/graphql
than this is where you have to issue the options request.
Do you mean link to download SDL document from or http://example.org/graphql link to send requests?
No, it is more like the idea with the custom scalars where you would point to the specification document of the DateTime
scalar for instance.
For this particular case we would then point to the URL where the GraphQL HTTP Spec is published.
from graphql-over-http.
The spec identifier would need to be parsable, and ideally able to communicate which features it supports (for example, sending via POST only, multipart, websocket, etc).
It sounds to be basically the same like with the scalar. It does not have to be parsable in the sense that you would extract from it various information. I think it is enough if it is just the URL to the specific spec version.
But I mean, it depends where the HTTP spec really is going. Do we want to create a minimal spec that describes the minimal necessary to communicate with a GraphQL server or are we heading into things like @defer
where we also want to describe how we would do result patches over http.
Personally I think GraphQL over HTTP should consist of a view specs :)
In RFC 6648 the recommendation to prefix application-specific headers with X- was retracted. It is mentioned in RFC 2616 as a permanently-reserved prefix for implementors, but is deprecated due to the complexities of migrating prefixed headers to standardized ones.
https://tools.ietf.org/html/rfc6648
from graphql-over-http.
@michaelstaib Thank you, I realized that it's about HTTP spec support.
from graphql-over-http.
I am just wondering if we really should have a way to ask the server for the http features that the server supports.
The suggestions that we ask the server just if it supports the spec might be not enough.
I remember @robzhu raising the idea for asking a GraphQL server for what features it does support from the core spec. While I do not see that with the core spec I think it is an interesting concept for the HTTP spec.
Things like request batching, operation batching, WebSocket subscriptions, SignalR subscriptions and so on are features that are closely related to the transport layer and I think we cannot expect that every server implements all of those. I think a capability like that would lower the burden to implement the HTTP spec while also allowing to standardize things like batching and subscriptions and so on.
from graphql-over-http.
I am totally in support of this but in the manner @mike-marcacci suggests.
from graphql-over-http.
I hope that the server responding to application/graphql+json
should be sufficient to indicate it implements the spec. Let's leave feature discovery for a different topic (which may well include an OPTIONS
request).
from graphql-over-http.
Related Issues (20)
- Spec references RFC7231 which is obsoleted HOT 4
- Response status code as `application/json` content HOT 5
- Clarify the use of HTTP GET and POST request HOT 2
- Status codes for unauthenticated OAuth errors HOT 1
- Optional query discussion HOT 13
- GraphQL request optional parameters HOT 2
- Kitchen sink HTTP requests HOT 3
- Allow non-UTF-8 encodings HOT 2
- What is well-formed response HOT 3
- Status codes 404 and 410 HOT 1
- Clarification for `Accept: */*` HOT 8
- Should we explicitly support `Content-Type: application/graphql`? HOT 13
- Should the query property really be required? HOT 1
- Make it clear that extra keys in the request/response payloads are not allowed HOT 2
- [2023-10] Add changes promoting spec to RFC 2 status
- [2023-10] Add RFC2 status to next GraphQL Spec WG HOT 1
- Create the "Action Item" issue template
- [2023-11] Add notes about security to GraphQL-over-HTTP spec HOT 8
- [2024-01-25] Contact Apollo about persisted operations appendix HOT 2
- What is the rationale for handling Invalid parameters as 400? HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-over-http.