Created
          July 6, 2016 14:32 
        
      - 
      
- 
        Save nobodyiam/723aa16ea33f552f794806c5f62648b5 to your computer and use it in GitHub Desktop. 
    Apollo client change listener
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Config config = ConfigService.getAppConfig(); | |
| config.addChangeListener(new ConfigChangeListener() { | |
| @Override | |
| public void onChange(ConfigChangeEvent changeEvent) { | |
| for (String key : changeEvent.changedKeys()) { | |
| ConfigChange change = changeEvent.getChange(key); | |
| System.out.println(String.format( | |
| "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", | |
| change.getPropertyName(), change.getOldValue(), | |
| change.getNewValue(), change.getChangeType())); | |
| } | |
| } | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment