-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Port of graphql-relay-js #3
Comments
I'd be happy to do so, but realisticly - can't provide any timeframes on when this will be done. Contributions are welcome if you get there before me! Separate repo is another option. |
Thanks for the reply! I'll definitely do a pull request if I get there first, but I'm much more of a novice at PHP. Thanks for this library! I'm currently testing using it with out Laravel backend. |
I've already done this with a bit help from graphql-lavarel. Here are few things missing that I've done:
|
@arec about RelayJS schema - use query from I currently do it via custom node-js script that uses same introspection query from graphql-js, in case if someone is interested: #!/usr/bin/env babel-node --optional es7.asyncFunctions
import fs from 'fs';
import path from 'path';
import { introspectionQuery } from 'graphql/utilities';
import rp from 'request-promise';
var options = {
uri: 'path-to-your-graphql-endpoint',
method: 'POST',
form: {
query: introspectionQuery
}
};
console.log('Requesting schema from', options.uri);
rp(options)
.then((result) => {
var fname = path.join(__dirname, '/schema.json');
console.log('Successfully retrieved schema (' + (result||'').length + ') . Writing to ' + fname);
fs.writeFileSync(
fname,
result
// JSON.stringify(result, null, 2)
);
})
.catch((result) => {
console.error(result);
}); Wanted this to be integrated with JS workflow, hence JS version vs PHP. |
Great thanks. Never notice that REALLY BIG QUERY is right there! |
@arec, could you post a gist or something with your code for the NodeInterface, connectionTypes, and mutationTypes so I could see how you are doing it? |
@arec +1, I'd really like to see what you've done! |
Does anyone have a solution or workaround here? I would really like to play around with graphql and relay, but can't seem to get it working with the current package. |
@Gugudesaster Tools in https://github.com/graphql/graphql-relay-js are simple helpers around GraphQL system. They do not provide special structures or algorithms - they just slightly simplify creating GraphQL types specific for Relay. You should be able to create such types even without those helpers. Can you share what exactly blocks you? |
Also check out Relay specs for GQL types: https://facebook.github.io/relay/docs/graphql-relay-specification.html#content |
FYI: I'm currently working on an exact port of https://github.com/graphql/graphql-relay-js to PHP based on this repository here. Should be there soon... |
@ivome That's great! When you're done - post the link here to your repo and I'll add it to Readme. |
@ivome Nice! Can't wait to see what you come up with. @vladar Thanks for this awesome library. Currently I've been using these Laravel specific packages based off of your port:
You might want to add those to the Readme as well. |
I'm not done yet, but I just published the repo: https://github.com/ivome/graphql-relay-php The basic helper functions are all in place along with their tests. There are still a few things left to be done. Especially documentation is lacking. If someone wants to help, check out the issues: https://github.com/ivome/graphql-relay-php/issues |
Nice! Will throw away my current hackish helpers and use your repo instead. Added section to Readme on Complementary tools. Guess I can finally close this issue %) |
* Added inline fragments support to ResolveInfo * Revert "Added inline fragments support to ResolveInfo" This reverts commit c35379c. * Inline fragments and union type support for QueryPlan * Introduced $options to prevent BC * No more underscores for fragments data * Fixed Scrutinizer * Fixed Scrutinizer #2 * Fixed Scrutinizer #3 * Renamings; merging fields inside fragments * Fixed fields order for merged types * Grouping implementor fields for abstract types
Are you planning on integrating any of the graphql relay helpers into this library? https://github.com/graphql/graphql-relay-js
The text was updated successfully, but these errors were encountered: