-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Named fragment support. #251
Conversation
@helfer - could you review? |
@@ -4,7 +4,7 @@ Expect active development and potentially significant breaking changes in the `0 | |||
|
|||
### vNEXT | |||
- Removed AuthTokenHeaderMiddleware code and related tests from apollo-client [Issue #247](https://github.com/apollostack/apollo-client/issues/247) | |||
- Fixed the getFromAST functions so that they work with queries that have named fragments (i.e. working toward named fragment support) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an issue and PR link please!
Made the changes. |
@@ -200,4 +202,22 @@ describe('AST utility functions', () => { | |||
const newDoc = replaceOperationDefinition(queryWithFragments, newQueryDef); | |||
assert.equal(print(newDoc), print(expectedNewQuery)); | |||
}); | |||
|
|||
it('should create the fragment sym table correctly', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be renamed to fragment map as well
Just one tiny comment about one of the tests. Ready to merge otherwise. 🎉 |
Fixed. |
Looks awesome! |
Hm, we seem to have merged something in the meantime. Can you rebase one last time? |
Rebased. |
Merged! |
Named fragment support within the client. Now passes around the fragments within a query as a symbol table (i.e. an object mapping from fragment name to the fragment definition).
TODO: