-
Notifications
You must be signed in to change notification settings - Fork 26
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
README Show graphql syntax used #147
Comments
Hey @jrock2004 Sounds good. Do you mean incoming or outgoing? Or both? |
I am just confused how I would create my models and adapters to match the graphql syntax like above |
Also, is this only supported for ruby? All your docs are in ruby code |
You can set up your ember models as normal and just make sure that both your
It should support any graphql backend. Here's an example from our code base. models/comment.js import DS from 'ember-data';
const { attr, belongsTo } = DS;
export default DS.Model.extend({
body: attr('string'),
createdAt: attr('date'),
important: attr('boolean', { defaultValue: false }),
advisor: belongsTo('advisor', { async: true }),
user: belongsTo('user', { async: true }),
}); adapters/application.js import { Adapter } from 'ember-graphql-adapter';
export default Adapter.extend(); serializers/application.js import { Serializer } from 'ember-graphql-adapter';
export default Serializer.extend(); and this is the query that goes out:
|
In your readme, it would be helpful to see the graphql sybtax that the adapters are trying to use. This will help out understand how to use for our needs.
Something like this
The text was updated successfully, but these errors were encountered: